[Bug breakpoints/25150] New: Ignore count used hex by default

damien.ruscoe at gmail dot com sourceware-bugzilla@sourceware.org
Wed Oct 30 12:46:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=25150

            Bug ID: 25150
           Summary: Ignore count used hex by default
           Product: gdb
           Version: 8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: damien.ruscoe at gmail dot com
  Target Milestone: ---

A small interface issue that causes me a little inconvenience from time to
time.
When putting an ignore count on a breakpoint gdb treats the count as a hex
number by default. 
Unless anybody can think of a valid reason to keep this default as hex then I
believe the default should be decimal.

(gdb) ignore 1 12
Will ignore next 18 crossings of breakpoint 1.

The above is unintuitive to me.


Hex can, and commonly is, prefixed with 0x which would enable users to specify
ignore counts in the format which fits their current needs (if hex, or binary,
is required)

(gdb) ignore 1 0x12
Will ignore next 18 crossings of breakpoint 1.
(gdb) ignore 1 011
Will ignore next 9 crossings of breakpoint 1.

The default not being decimal then removes this option of specifying a decimal
ignore count from the user. Is there an unknown "decimal" prefix that I do not
know about?


Furthermore, (This could be the same issue or secondary bug).
The GDB print command works in much the same way as described above. I will
just leave examples here as the description and suggestions above are still
fitting.
(gdb) print /d 12
$3 = 18
(gdb) print /d 0x12
$4 = 18
(gdb) print /d 012
$5 = 10

Thanks
Damien

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list