bugDDD - Bugs: bug #25513, GDB "set print repeats"...


bug #25513: GDB "set print repeats" can confuse DDD

Submitted by:  Peter Wainwright <pwainwright>
Submitted on:  Sat 07 Feb 2009 12:53:56 PM UTC  
Category:  Data display Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  3.3.12-rc2

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 07 Feb 2009 12:56:50 PM UTC, comment #1: 

I've attached the example.  Savane reformatted the inline version and removed the repeated spaces which were the whole point of the example...

(file #17417)

Peter Wainwright <pwainwright>
Sat 07 Feb 2009 12:53:56 PM UTC, original submission:  

Consider this example:

  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.

Peter Wainwright <pwainwright>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #17417:  test.c added by pwainwright (170B - text/x-csrc - Example code to show interaction with gdb "set print repeats")


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pwainwright (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-02-07 pwainwright Attached File- => Added test.c, #17417

    Back to the top

    Powered by Savane 3.5