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
Luis Machado <luisgpm@linux.vnet.ibm.com> writes:
> @@ -260,14 +261,15 @@
> {
> 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)))
Indentation is wrong here.
> @@ -275,7 +277,8 @@
> {
> const char *name = ps->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)))
Likewise. Alternatively, drop the inner pair of parens, the semantics
will be the same.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."