This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Move dll related code out of inferiors.c


On 02/09/2012 03:48 AM, Yao Qi wrote:
> Hi,
> When modifying gdbserver/inferiors.c, I find dll-related code is put
> in it, but dll stuff is not related to inferior.  In fact, dll
> related code is using `struct inferior_list' as a linked list.  This
> patch is to move dll stuff out of inferiors.c to a new file dll.c,
> but still using `struct inferior_list' as a linked list data
> structure.
> 
> Tested on x86_64-linux/native-gdbserver, and cross compiled gdbserver
> for i586-mingw32 (because dll.c is used by win32-low.c).  OK to
> apply?

Ok with the below fixed.

> Note that it is not perfect to leave dll.c using `struct
> inferior_list'.  The follow-up patch can add a general `struct list'
> and both dll.c and inferiors.c can use it.  What do you think?

Fine with me.  That or make gdbserver use vecs.


> 	* inferiors.c: Move code to ...
> 	* dll.c: .... here.  New.
> 	* server.h: Declare clear_dlls.
> 	* Makefile.in (SFILES): Add dll.c.
> 	(OBS): Add dll.o

A new rule for dll.o is missing.


> +/* Copyright (C) 2012 Free Software Foundation, Inc.

The year thing again.  The contents of the new file are not new.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]