This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/symtab] Fix breakpoints by full path
- From: Jim Blandy <jimb at redhat dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 20 Sep 2004 11:57:51 -0500
- Subject: Re: [rfa/symtab] Fix breakpoints by full path
- References: <20040920001659.GA24644@nevyn.them.org>
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.)