Trouble building Apple gdb on Linux

Michael D. Crawford crawford@goingware.com
Sat Dec 11 21:44:00 GMT 2004


Hi,

I'm building Apple's gdb-2.9.2 on Linux by following the instructions in "Useing 
non-Darwin systems as Darwin/Mac OS X kernel debugging hosts":

http://pknet.com/~joe/apple-cross-gdb.html

I'm trying to build Apple's gdb on my Debian sarge PC so I can debug a kernel 
extension (device driver) on my Mac OS X Mac over ethernet.  I need to do this 
because the ethernet port is busted on my other Mac and I'm not able to get it 
repaired right away.

The page advises one not to run ./configure in the main source directory, but to 
configure and build each library one at a time and then to build gdb.  This goes 
well most of the way but when building gdb, from Apple's gdb-292 source with 
some patches applied, I get these errors:

gcc -c -g -O2 -DTARGET_POWERPC -I./macosx   -I. -I. -I./config 
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode 
-I./../readline/.. -I../bfd -I./../bfd  -I./../include -I../intl -I./../intl 
-DMI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses 
-Wpointer-arith -Wuninitialized  dwarf2read.c
dwarf2read.c: In function `dwarf2_attach_fields_to_type':
dwarf2read.c:2225: error: assignment of read-only member `private_field_bits'
dwarf2read.c:2229: error: assignment of read-only member `protected_field_bits'
dwarf2read.c:2233: error: assignment of read-only member `ignore_field_bits'
dwarf2read.c:2246: error: assignment of read-only member `virtual_field_bits'
dwarf2read.c:2248: error: assignment of read-only member `n_baseclasses'
dwarf2read.c: In function `dwarf2_attach_fn_fields_to_type':
dwarf2read.c:2445: error: assignment of read-only member `fn_fieldlists'
dwarf2read.c:2463: error: assignment of read-only member `nfn_fields'
dwarf2read.c:2464: error: assignment of read-only member `nfn_fields_total'
make: *** [dwarf2read.o] Error 1

Looking at the source in question, it looks like it's doing something complex 
via a bunch of macros that I don't understand.

Can anyone help me out here?

I will go ahead and try to figure it out but I thought someone might be able to 
help.

Thanks!

Michael D. Crawford
crawford@goingware.com

    Read "GoingWare's Bag of Programming Tricks" at:
         http://www.goingware.com/tips/



More information about the Gdb mailing list