[bug #25513] GDB "set print repeats" can confuse DDD
Peter Wainwright <[email protected]> Sat, 07 Feb 2009 12:53:57 +0000
| Newsgroups | gmane.comp.debugging.ddd.bugs |
|---|---|
| Message-ID | <[email protected]> |
URL:
<http://savannah.gnu.org/bugs/?25513>
Summary: GDB "set print repeats" can confuse DDD
Project: DDD
Submitted by: pwainwright
Submitted on: Sat 07 Feb 2009 12:53:56 GMT
Category: Data display
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: 3.3.12-rc2
_______________________________________________________
Details:
Consider this example:
main()
{
char *x[2] ={
"top left top right",
"bottom left bottom right"
};
}
Set break on closing } and run. Then graph display x, and graph display
x[0].
If "set print repeats" is 10, the the display of x will contain 6 elements:
"top left" | ' ' <43x> | "top right" | "bottom left" | ' ' <40x> | "bottom
right"
and the display of x[0] will just show "top left".
This occurs because the output of "print x" contains commas which are
interpreted by DDD as field separators:
(gdb) print x
$2 = {0x400550 "top left", ' ' <repeats 43 times>, "top right",
0x400590 "bottom left", ' ' <repeats 40 times>, "bottom right"}
I can work around this by setting "set print repeats" to a large value.
Probably DDD should temporarily override the user-set value of this parameter
when capturing data for displays.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25513>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/