Re: Can't build Apple's GDB on Linux
Re: Can't build Apple's GDB on Linux
- Subject: Re: Can't build Apple's GDB on Linux
- From: Jerry Pendergraft <email@hidden>
- Date: Mon, 13 Dec 2004 09:47:35 -0600 (CST)
I have not done a lot of two machine debugging so I could be wrong, but I
think you can just run the linux gdb on the linux machine and connect to
the OS X machine.
--
Jerry Pendergraft email@hidden
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254 mobile: 651-491-0163
On Sun, 12 Dec 2004, Michael D. Crawford wrote:
> I need to build Apple's GDB on Linux so I can use the two-machine debugger on an
> IOKit driver I'm developing. I have two OS X Macs, but the ethernet port on one
> is busted, and there's no time to get it repaired, so I need to be able to debug
> from Linux. My linux box is a debian sarge system.
>
> I'm following the instructions on a page called "Using non-Darwin systems as
> Darwin/Mac OS X kernel debugging hosts" at:
>
> http://pknet.com/~joe/apple-cross-gdb.html
>
> What the page says to do is to start with Apple's gdb-292 code, replace the
> mmalloc directory in 292 with the one from the release gdb-53 kernel, and apply
> a small patch. When I try that, almost everything works except Apple's
> dwarf2read.c won't compile. I don't understand what the error messages mean,
> and I don't understand the source code at the lines that gcc complains about.
> It's a bunch of stuff with macros that I haven't been able to figure out yet.
>
> I can build gdb-53 on linux with no trouble. I can build gdb-292 on OS X with
> no trouble. The functions in question seem identical between both versions, but
> I can't replace Apple's dwarf2read.c with the stock one because they are
> otherwise quite different.
>
> Here are the errors I get. If you can even tell me what they mean that would be
> a big help:
>
> 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
>
> dwarf2read.c is unpatched - it's identical to Apple's stock 292 file, but
> something about trying to compile it under Debian sarge seems to break something.
>
> If I'm able to get this to work, I expect I could later provide binary packages
> for others to use.
>
> Thanks for your help,
>
> Michael D. Crawford
> email@hidden
>
> Read "GoingWare's Bag of Programming Tricks" at:
> http://www.goingware.com/tips/
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden