This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] win32-nat.c: Add dll names if debugevents is on
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <muller at ics dot u-strasbg dot fr>
- Date: Fri, 13 Jun 2008 15:32:22 +0100
- Subject: Re: [RFA] win32-nat.c: Add dll names if debugevents is on
- References: <000001c8cd57$c9cf3d30$5d6db790$@u-strasbg.fr>
Thanks, I've wanted this before too.
A Friday 13 June 2008 14:17:11, Pierre Muller wrote:
> $ cvs diff -up gdb/win32-nat.c
> Index: gdb/win32-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/win32-nat.c,v
> retrieving revision 1.152
> diff -u -p -r1.152 win32-nat.c
> --- gdb/win32-nat.c 20 May 2008 18:36:36 -0000 1.152
> +++ gdb/win32-nat.c 13 Jun 2008 11:27:18 -0000
> @@ -744,6 +744,7 @@ handle_load_dll (void *dummy)
> if (!dll_name)
> return 1;
>
> + DEBUG_EVENTS (("gdb: Loading dll \"%s\".\n",dll_name));
> solib_end->next = win32_make_so (dll_name, (DWORD) event->lpBaseOfDll);
While you're at it, would it be useful to also include the dll
load base in the output?
> solib_end = solib_end->next;
>
> @@ -771,6 +772,9 @@ handle_unload_dll (void *dummy)
> so->next = sodel->next;
> if (!so->next)
> solib_end = so;
> + if (sodel->so_original_name)
> + DEBUG_EVENTS (("gdb: removing dll \"%s\".\n",
Small nit, wouldn't "gdb: Unloading dll" be clearer (and mirror
the other message) ? And perhaps output "<unknown name>", if
there's no so_original_name to print? Can that happen? I
can't remember off-hand.
--
Pedro Alves