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/22980] New: Using "set osabi none" still gives a Linux gdbarch


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

            Bug ID: 22980
           Summary: Using "set osabi none" still gives a Linux gdbarch
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com
  Target Milestone: ---

Using your everyday GDB (default arch = x86-64 linux), doing "set osabi none"
still generates a linux gdbarch:

(gdb) set debug arch 1
(gdb) show osabi 
The current OS ABI is "auto" (currently "GNU/Linux").
The default OS ABI is "GNU/Linux".
(gdb) set osabi none
gdbarch_find_by_info: info.bfd_arch_info i386
gdbarch_find_by_info: info.byte_order 1 (little)
gdbarch_find_by_info: info.osabi 4 (GNU/Linux)  <---- bad?
gdbarch_find_by_info: info.abfd 0x0
gdbarch_find_by_info: info.tdep_info 0x0
gdbarch_find_by_info: Previous architecture 0x55f714c182d0 (i386) selected
gdbarch_update_p: Architecture 0x55f714c182d0 (i386) unchanged


It looks like "set osabi none" sets the requested osabi to GDB_OSABI_UNKNOWN. 
When it has this value, gdbarch_info_fill sets it to GDB_OSABI_DEFAULT, which
happens to be GDB_OSABI_LINUX.

-- 
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]