This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Don't set breakpoints on import stubs on Windows amd64
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 20 Mar 2015 16:03:30 +0000
- Subject: Re: [PATCH] Don't set breakpoints on import stubs on Windows amd64
- Authentication-results: sourceware.org; auth=none
- References: <1425646709-5216-1-git-send-email-jon dot turney at dronecode dot org dot uk> <550A09BE dot 7020601 at redhat dot com>
On 18/03/2015 23:26, Pedro Alves wrote:
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 366d828..21e7a77 100644
@@ -675,7 +675,7 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
&& (strncmp (name, "__imp_", 6) == 0
|| strncmp (name, "_imp_", 5) == 0))
- const char *name1 = (name == '_' ? &name : &name);
+ const char *name1 = &name;
struct bound_minimal_symbol found;
As is, that would make it look suspiciously like a bug to a casual
reader. It'd be very good to have a comment here.
But maybe if we rewrite this in terms of bfd_get_symbol_leading_char,
it ends up being "self commenting". Something like the hunk below.
Yes, that is better, and seems to work fine.