This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/15185] New: Dprintf should parse its string forvalidity right away
- From: "marc.khouzam at ericsson dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 24 Feb 2013 13:44:21 +0000
- Subject: [Bug breakpoints/15185] New: Dprintf should parse its string forvalidity right away
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15185
Bug #: 15185
Summary: Dprintf should parse its string for validity right
away
Product: gdb
Version: HEAD
Status: NEW
Severity: enhancement
Priority: P2
Component: breakpoints
AssignedTo: unassigned@sourceware.org
ReportedBy: marc.khouzam@ericsson.com
Classification: Unclassified
No evaluation of the dprintf string is done by GDB. This can be quite poor for
the user since it is only at run-time that an error will be given.
I think that a checking the expression early would much more user-friendly.
> gdb.7.6 ~/loopfirst
GNU gdb (GDB) 7.5.50.20130223-cvs
(gdb) dprintf 8,"hello$d",i
Dprintf 1 at 0x804855f: file loopfirst.cc, line 8.
(gdb) r
Starting program: /home/lmckhou/loopfirst
warning: Cannot call inferior functions, you have broken Linux kernel i386 NX
(non-executable pages) support!
hellofriend
Wrong number of arguments for specified format-string
(gdb) bt
#0 main () at loopfirst.cc:8
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.