From: Marc Khouzam <marc.khouzam@ericsson.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "'gdb@sourceware.org'" <gdb@sourceware.org>
Subject: RE: Pending breakpoints on lines that don't exist
Date: Fri, 06 Jan 2012 02:30:00 -0000 [thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC578C87E5DF@EUSAACMS0703.eamcs.ericsson.se> (raw)
In-Reply-To: <20120104035128.GP2742@adacore.com>
> From: Joel Brobecker [brobecker@adacore.com]
> Sent: January 3, 2012 10:51 PM
> To: Marc Khouzam
> Cc: 'gdb@sourceware.org'
> Subject: Re: Pending breakpoints on lines that don't exist
>
> I can imagine that it is a bit of a pain to see pending breakpoints
> being created for human-entry errors. I tend to make this type of
> error regularly, for instance. But it apparently it is only an issue
> if you use the "console" interpreter, since "-break-insert" flat out
> refuses the breakpoint for me:
>
> (gdb)
> -break-insert foo.c:100
> ^error,msg="No line 100 in file \"foo.c\"."
Just a clarification FYI. In Eclipse, we always use -break-insert -f which
requests pending breakpoints:
(gdb)
-break-insert -f loopfirst.cc:100
&"No line 100 in file \"loopfirst.cc\".\n"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="loopfirst.cc:100",times="0",original-location="loopfirst.cc:100"}
> ... whereas "break" asks me whether I want to insert a breakpoint:
>
> (gdb) b foo.c:100
> No line 100 in file "foo.c".
> Make breakpoint pending on future shared library load? (y or [n]) n
> (gdb) b bar.c:100
> No source file named bar.c.
> Make breakpoint pending on future shared library load? (y or [n]) n
To have a consistent behavior between UI and console, we always set:
"-gdb-set breakpoint pending on".
So, for the gdb console in eclipse, the pending breakpoint also gets
set in the case of invalid lines or files. Although GDB indicates this
clearly:
b foo.c:100
No source file named foo.c.
Breakpoint 7 (foo.c:100) pending.
b 10000
No line 10000 in the current file.
Breakpoint 9 (10000) pending.
Note that all this is fine, I just wanted to make sure it was planned.
Thanks for explaining things.
Marc
next prev parent reply other threads:[~2012-01-06 2:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-01-04 20:49 ` Tom Tromey
2012-01-05 12:56 ` Pedro Alves
2012-01-04 14:28 Richard Guenther
2012-01-04 14:29 ` Richard Guenther
2012-01-04 20:42 ` Tom Tromey
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=F7CE05678329534C957159168FA70DEC578C87E5DF@EUSAACMS0703.eamcs.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/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