[Bug tdep/33377] New: GDB on GNU/Hurd 64-bit warns about missing osabi handler

sergiodj at sergiodj dot net sourceware-bugzilla@sourceware.org
Fri Sep 5 03:46:32 GMT 2025


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

            Bug ID: 33377
           Summary: GDB on GNU/Hurd 64-bit warns about missing osabi
                    handler
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: sergiodj at sergiodj dot net
  Target Milestone: ---

Hi,

This came from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113764 .

I compiled GDB for GNU/Hurd amd64 with the following configure parameters:

=============
(gdb) show configuration 
This GDB was configured as follows:
   configure --host=x86_64-gnu --target=x86_64-gnu
             --with-auto-load-dir=$debugdir:$datadir/auto-load
             --with-auto-load-safe-path=$debugdir:$datadir/auto-load
             --with-expat
             --with-gdb-datadir=/usr/share/gdb (relocatable)
             --with-jit-reader-dir=/usr/lib/gdb (relocatable)
             --without-libunwind-ia64
             --with-lzma
             --with-babeltrace
             --without-intel-pt
             --with-xxhash
             --with-python=/usr (relocatable)
             --with-python-libdir=/usr/lib (relocatable)
             --without-debuginfod
             --with-curses
             --without-guile
             --without-amd-dbgapi
             --enable-source-highlight
             --enable-threading
             --enable-tui
             --with-system-readline
             --with-separate-debug-dir=/usr/lib/debug (relocatable)
             --with-system-gdbinit=/etc/gdb/gdbinit
             --with-system-gdbinit-dir=/etc/gdb/gdbinit.d

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

GNU Readline library version: 8.3       (system)
==========

I'm now seeing the following warning when I start GDB (even without an
inferior):

==========
# gdb -q
gdb: warning: A handler for the OS ABI "GNU/Hurd" is not built into this
configuration
of GDB.  Attempting to continue with the default i386 settings.

(gdb) 
==========

I tried debugging what's going on but apparently GDB can't debug GDB on
GNU/Hurd amd64 (it enters an infinite loop and never starts the inferior GDB;
but that's another bug).  So I resorted to printf-debugging and found that the
problem happens because on gdb/osabi.c we call gdbarch_osabi_handler and while
there is a match for info.osabi == handler->osabi, their respective
bfd_arch_info structs are different:

info.osabi->bfd_arch_info = i386
handler->osabi->arch_info = i386:x86-64

Therefore can_run_code_for fails and gdbarch_osabi_handler returns NULL.

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


More information about the Gdb-prs mailing list