This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
breakpoints/2120: "info break" output not good when cond is a function call with string arg
- From: rgulati at cadence dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 26 Apr 2006 23:40:54 -0000
- Subject: breakpoints/2120: "info break" output not good when cond is a function call with string arg
- Reply-to: rgulati at cadence dot com
>Number: 2120
>Category: breakpoints
>Synopsis: "info break" output not good when cond is a function call with string arg
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Apr 26 23:48:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: rgulati@cadence.com
>Release: GDB 6.3
>Organization:
>Environment:
Red Hat Enterprise Linux WS release 3 (Taroon Update 5)
GCC 3.2.3
>Description:
If you create a conditional breakpoint on a function call, which takes one string argument, like:
(gdb) break test.cpp:1 if (foo("Rohit"))
(gdb) info break
Then "info break" prints the output in which the argument to the function, foo above, get printed as a comma separated ASCII values instead of the string itself:
What gets printed is :
....
stop only if foo ( {82 'R', 111 'o', 104 'h', 105 'i', 116 't', 0 '\0'})
I was expecting:
stop only if foo("Rohit")
thanks
Rohit
>How-To-Repeat:
To reproduce:
1. Create the following testcase in test.cpp:
bool foo(char* xxx) {return true;}
int main() {foo("Rohit");return 0;}
2. Compile "g++ -g test.cpp"
3. Start "gdb a.out"
4. Type these gdb commands:
(gdb)break test.cpp:1 if (foo("Rohit"))
(gdb)info break
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: