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

 
 

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

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

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Sat 07 Jan 2023 02:48:10 PM UTC, comment #2: 

The concept of DDD is to combine a graphical user interface in combination with the debugger console. There are many possible ways to break the interface to DDD by GDB commands. It is not useful to filter the GDB commands and restrict the use of GDB. A good example for the use of the console is: bug #50747: Add support for GDB's ProcessRecord

Stefan Eickeler <eickeler>
Project Administrator
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 Files:
   
   
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
  • -email is unavailable- added by eickeler (Posted a comment)
  • -email is unavailable- added by pwainwright (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-07 eickeler StatusNone Wont Fix
        Open/ClosedOpen Closed
    2009-02-07 pwainwright Attached File- Added test.c, #17417

    Back to the top

    Powered by Savane 3.9