From: Tom Tromey <tromey@redhat.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gdb@sourceware.org, brobecker@adacore.com
Subject: Re: Pending breakpoints on lines that don't exist
Date: Wed, 04 Jan 2012 20:42:00 -0000 [thread overview]
Message-ID: <m3d3az6vze.fsf@fleche.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1201041524310.4999@zhemvz.fhfr.qr> (Richard Guenther's message of "Wed, 4 Jan 2012 15:28:40 +0100 (CET)")
>>>>> "Richard" == Richard Guenther <rguenther@suse.de> writes:
Richard> (gdb) b expr.c:10850
Richard> No line 10850 in file "/space/rguenther/src/svn/trunk/libcpp/expr.c".
Richard> because I meant /space/rguenther/src/svn/trunk/gcc/expr.c! Now
Richard> getting the pending breakpoing seems to be even worse. I'd
Richard> expect sth like
[...]
In 7.4, a linespec like "expr.c:10850" will match line 10850 in all
files named expr.c.
E.g., from the test suite:
(gdb) b thefile.cc:14
Breakpoint 1 at 0x400592: thefile.cc:14. (2 locations)
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE>
1.1 y 0x0000000000400592 in n(int)
at ../../../archer/gdb/testsuite/gdb.linespec/base/two/thefile.cc:14
1.2 y 0x0000000000400556 in m(int)
at ../../../archer/gdb/testsuite/gdb.linespec/base/one/thefile.cc:14
This breakpoint got locations in two different files, both named 'thefile.cc'.
The rationale behind this is that gdb should not guess what you meant.
The right thing also happens if one "thefile.cc" has the indicated line
but the other does not.
Richard> it's especially bad that gdb does not recognize
Richard> (gdb) b gcc/expr.c:10850
Richard> but requires a full path (bah).
Yeah, this is still a problem. I intend to fix it at some point, but
it is too late for 7.4.
I think what makes sense here is to just do the obvious check of the
user-supplied name against the final components of the file names.
Tom
next prev parent reply other threads:[~2012-01-04 20:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 14:28 Richard Guenther
2012-01-04 14:29 ` Richard Guenther
2012-01-04 20:42 ` Tom Tromey [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-03 21:30 Marc Khouzam
2012-01-04 3:52 ` Joel Brobecker
2012-01-04 5:07 ` Eli Zaretskii
2012-01-04 7:17 ` Joel Brobecker
2012-01-04 8:08 ` Eli Zaretskii
2012-01-04 9:13 ` Joel Brobecker
2012-01-06 2:30 ` Marc Khouzam
2012-01-04 20:49 ` Tom Tromey
2012-01-05 12:56 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d3az6vze.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox