-file-list-exec-source-files

Andreas Schwab schwab@suse.de
Sun Jun 27 18:12:00 GMT 2004


Bob Rossi <bob@brasko.net> writes:

> +/* Finds the fullname that a symtab represents.
> +
> +   If this functions finds the fullname, it will save it in ps->fullname
> +   and it will also return the value.
>  
> +   If this function fails to find the file that this symtab represents,
> +   NULL will be returned and ps->fullname will be set to NULL.  */

This causes gdb to crash in lookup_symtab.

    if (full_path != NULL)
      {
	const char *fp = symtab_to_fullname (s);
	if (FILENAME_CMP (full_path, fp) == 0)
	  {
	    return s;
	  }
      }

    if (real_path != NULL)
      {
	char *rp = gdb_realpath (symtab_to_fullname (s));
        make_cleanup (xfree, rp);
	if (FILENAME_CMP (real_path, rp) == 0)
	  {
	    return s;
	  }
      }

Neither of these places expect symtab_to_fullname to return NULL.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gdb-patches mailing list