This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/16551] New: Execution stops when encountering a dprintf with an invalid string
- From: "marc.khouzam at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 10 Feb 2014 18:18:13 +0000
- Subject: [Bug breakpoints/16551] New: Execution stops when encountering a dprintf with an invalid string
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16551
Bug ID: 16551
Summary: Execution stops when encountering a dprintf with an
invalid string
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: marc.khouzam at ericsson dot com
I define a dprintf that has an error in its printout function (as the user may
do this by mistake). When the dprintf is hit, an error printout is output and
the execution stops. However, no *stopped event is issued.
This missing *stopped event is not good, but I think the problem to fix is that
the execution should not stop in this case. If a user sets a dprintf, she
expects the execution to continue and there may be negative consequence at
suddenly stopping the execution.
Addressing bug 15185 would probably fix this.
Here is a stripped session that shows how to reproduce:
> gdb -i mi loopfirst
=thread-group-added,id="i1"
~"GNU gdb (GDB) 7.7\n"
~"Reading symbols from loopfirst..."
~"done.\n"
(gdb)
dprintf 5,"%d\n",badvariable
(gdb)
i b
&"i b\n"
~"Num Type Disp Enb Address What\n"
~"1 dprintf keep y 0x000000000040054c in main() at
loopfirst.cc:5\n"
~" printf \"%d\\n\",badvariable\n"
^done
(gdb)
22-exec-run
=thread-group-started,id="i1",pid="13398"
=thread-created,id="1",group-id="i1"
22^running
*running,thread-id="all"
(gdb)
22^error,msg="No symbol \"badvariable\" in current context."
(gdb)
i thre
&"i thre\n"
~" Id Target Id Frame \n"
~"* 1 process 13398 \"loopfirst\" main () at loopfirst.cc:5\n"
^done
=== Notice that the thread is stopped although we did an -exec-run ==
--
You are receiving this mail because:
You are on the CC list for the bug.