This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/23390] New: GDB does not honor 'set output-radix 16'; it displays in octal


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

            Bug ID: 23390
           Summary: GDB does not honor 'set output-radix 16'; it displays
                    in octal
           Product: gdb
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: noloader at gmail dot com
  Target Milestone: ---

I've tried setting base 16 radix in GDB interactive session and .gdbinit. Both
are no joy. I don't read in octal so it makes a GDB session quite painful.

The session below is from an ARM dev-board but the same happens on desktops,
too.

I've also noticed GDB has problems displaying short's too. It tries to print
them as strings rather that the 2-byte hex as requested.

The problem has existed since at least the GDB 6 days.

Breakpoint 2, CRYPTOGAMS_encrypt (
    inBlock=0x4f3020 "}ќ\322\021i\f;\270\001\344\267R\253\t\004",
    xorBlock=0x0,
    outBlock=0x4fc1f0 "}ќ\322\021i\f;\270\001\344\267R\253\t\004",
    rkey=0x4fbce8) at rijndael.cpp:334
334             AES_encrypt(inBlock, outBlock, rkey);

(gdb) set output-radix 16
Output radix now set to decimal 16, hex 10, octal 20.
(gdb) c
Continuing.

Breakpoint 2, CRYPTOGAMS_encrypt (
    inBlock=0x4f3020 "%F\233\235;\354*6\236\360\232\f\036\017\023q",
    xorBlock=0x0,
    outBlock=0x4fc1f0 "%F\233\235;\354*6\236\360\232\f\036\017\023q",
    rkey=0x4fbce8) at rijndael.cpp:334
334             AES_encrypt(inBlock, outBlock, rkey);

(gdb) shell gdb --version
GNU gdb (GDB) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.

Out of morbid curiosity, who (or how many people) read in octal? How did it
become the dominant use case so that it is displayed by default and ignore user
settings? (I know lots of people who fluently scan hex. I don't know anyone who
does the same in octal. I guess the Red Hat offices are different than the most
of the world)

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]