This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Listing cpp source code in mainless binaries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]