[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-debug-dev] 1.0.1 Breakpoint Conditions and GDB 5.2.1 MI
|
Hi!
We have found issues with breakpoint conditions on 1.0.1 and gdb 5.2.1. The
meat of the problem is that if a user types j==20 into the condition
window, CDT sends the command -break-condition X "j==20" to gdb. On our
version of 5.2.1, this causes GDB to allocate space for the string "j==20"
and then use the pointer to that string as the evaluation, which always
returns true.
We are a little stumped here. Do you all feel that this is a GDB/MI problem
or is this something in the CDT? Are the quotes legal? Our instinct says
that what CDT is sending is valid and GDB is buggy. Here's why:
Consider the break condition: strcmp(" ",foo).
This is a valid GDB condition, but the space in the first argument to
strcmp requires the mi argument be quoted, the only way to send this to mi is:
-break-condition 1 "strcmp(\" \",foo)"
That implies that MI should be stripping unquoted ""'s around the argument.
We would think that if you really wanted the behavior that GDB is
demonstrating for this you should send: -break-command 1 \"j==20\". Perhaps
we are off base. Any thoughts?
Thanks!
-Chris