This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Move dll related code out of inferiors.c
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 14 Feb 2012 12:58:34 +0000
- Subject: Re: [patch] Move dll related code out of inferiors.c
- References: <4F334206.7080402@codesourcery.com>
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