This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Listing cpp source code in mainless binaries
- From: Daniel Jacobowitz <drow at false dot org>
- To: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Jun 2008 10:17:54 -0400
- Subject: Re: [PATCH] Listing cpp source code in mainless binaries
- References: <1213122525.10042.148.camel@gargoyle>
On Tue, Jun 10, 2008 at 03:28:45PM -0300, Luis Machado wrote:
> - /* All right; find the last file in the symtab list (ignoring .h's). */
> + /* All right; find the last file in the symtab list (ignoring .h's)
> + and namespace symtabs. */
That should be inside the parentheses :-)
> @@ -260,7 +261,8 @@
> {
> const char *name = s->filename;
> int len = strlen (name);
> - if (!(len > 2 && strcmp(&name[len - 2], ".h") == 0))
> + if (!(len > 2 && (strcmp (&name[len - 2], ".h") == 0
> + || strcmp (name, "<<C++-namespaces>>") == 0)))
> current_source_symtab = s;
> }
> }
>
Also, the same check is needed a few lines down. Otherwise OK.
--
Daniel Jacobowitz
CodeSourcery