gdb 8.3: "handler for the OSI ABI "FreeBSD" is not built into this configuration"

Chris Nicol
Sun May 24 01:55:05 GMT 2020

Thanks, Martin. Yes, when the gdb_6.1.1 did not work, I first had a look 
to build the 9.1 in /usr/ports/devel/gdb, but the Makefile indicates 
NOT_FOR_ARCHS= sparc64, and a comment above it "untested on sparc64, 
might work". Not encouraged, I went on to build the 9.1 from the gnu 
source. Maybe I will try the /usr/ports version if I comment out the 
NOT_FOR_ARCHS, since there might be some tweaks in there that is 
specific to FreeBSD.

I will also try what you are suggesting below. Hard to track down the 
llvm-tblgen problem when I can't debug why it is seg. faulting... and 
getting some help on the llvm list has been pretty fruitless.


On 5/23/2020 4:17 PM, Martin Simmons wrote:
> Hi Chris,
> Yes, the architecture is detected from the binary if given, otherwise it
> defaults to the main architecture.
> BTW, have you tried building devel/gdb from the /usr/ports tree?  That
> is the normal way to get any specific tweaks that the FreeBSD project
> already knows about.
> I can't give you comprehensive instructions on how to debug the nested
> gdb.  I think you should start by looking at the function
> gdbarch_init_osabi in gdb/osabi.c to see what it does.  In summary, it
> is looking in the list gdb_osabi_handler_list for something that matches
> the argument named info.  It only finds a match if the osabi is the same
> and it has an acceptable arch_info (the function can_run_code_for).  It
> prints the warning if it doesn't find a match.
> The command sequence to start debugging it is something like this:
> break gdbarch_init_osabi
> run
> It should then stop at the breakpoint, where it is useful to do:
> print info
> print *info.bfd_arch_info
> set $tmp=gdb_osabi_handler_list
> while $tmp
> print *$tmp
> print *$tmp->arch_info
> set $tmp=$tmp->next
> end
> That might be enough to find why there is no match, but otherwise you
> have to repeatedly use the step command and print other things that the
> code is examining.
> __Martin

Dr. Christopher J. Nicol,               Phone:          (403) 329-2261
University Librarian and                FAX:            (403) 329-2234
Professor of Economics,
The University of Lethbridge,           E-Mail:
Lethbridge, Alberta, T1K 3M4, CANADA.

More information about the Gdb mailing list