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 displaySeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: 3.3.12-rc2

Add a New Comment (Rich MarkupRich 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:

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.

Peter Wainwright <pwainwright>

 

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

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by pwainwright (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Feb 2009 12:56:50 PM UTCpwainwrightAttached File-=>Added test.c, #17417

    Back to the top


    Powered by Savane 3.1-cleanup