This is the mail archive of the gdb-patches@sources.redhat.com 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: [rfa/symtab] Fix breakpoints by full path


Daniel Jacobowitz <drow@false.org> writes:
> This patch fixes a bug in setting breakpoints by full path.  The problem is
> two dangling users of source_full_path_of; the right way to set
> pst->fullname now is to use psymtab_to_fullname, which takes advantage of
> pst->dirname if it was available.  source_full_path_of only considers the
> search path, which is less useful.
> 
> Without the patch, this sequence would fail:
>   cd tmp
>   gcc -o tmp tmp.c
>   cd ..
>   gdb ./tmp/tmp
>   break /path/to/tmp/tmp.c:1
> 
> But this one would succeed:
>   cd tmp
>   gcc -o tmp tmp.c
>   cd ..
>   gdb ./tmp/tmp
>   interpreter-exec mi -file-list-exec-source-files
>   break /path/to/tmp/tmp.c:1
> 
> (because -file-list-exec-source-files initialized fullname correctly).
> 
> Tested on i386-pc-linux-gnu, no regressions, fixes the new failure in
> fullname.exp.  OK?

Yep.

(Working on the Dwarf 2 ICU patch.)


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