Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* cross-debugger build problem
@ 2001-03-31 13:51 Baurjan Ismagulov
  2001-04-02  9:23 ` Kevin Buettner
  0 siblings, 1 reply; 4+ messages in thread
From: Baurjan Ismagulov @ 2001-03-31 13:51 UTC (permalink / raw)
  To: gdb

Hi,

I wish to use gdb to disassemble sparc-sun-linux binaries (with debug info) on an i386-*-linux host. I use gdb 5.0 on RedHat 6.2. I'm going to look into vmlinux built for sparc-linux.

While being not sure whether this is supported (I did read excellent gdb/doc/gdb.ps, as well as mailing list archives), I did "configure --target=sparc-sun-linux" and "make". The build failed at gdb/solib.c with errors like
solib.c: In function `solib_map_sections':
solib.c:369: structure has no member named `lm_addr'
...
solib.c: In function `solib_add_common_symbols':
solib.c:431: storage size of `inferior_rtc_symb' isn't known
solib.c:458: `N_COMM' undeclared (first use in this function)

(full output is lengthy, I will send it if anyone can help).

Does gdb support disassembling of binaries built for a target different from the host? If yes, how should I build gdb? Otherwise, what are my alternatives (other than running native gdb on sparc-linux)?

Thanks in advance,
Baurjan.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cross-debugger build problem
  2001-03-31 13:51 cross-debugger build problem Baurjan Ismagulov
@ 2001-04-02  9:23 ` Kevin Buettner
  2001-04-03 13:39   ` Baurjan Ismagulov
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2001-04-02  9:23 UTC (permalink / raw)
  To: Baurjan Ismagulov, gdb

On Apr 1, 12:49am, Baurjan Ismagulov wrote:

> I wish to use gdb to disassemble sparc-sun-linux binaries (with
> debug info) on an i386-*-linux host.  I use gdb 5.0 on RedHat 6.2. 
> I'm going to look into vmlinux built for sparc-linux.
> 
> While being not sure whether this is supported (I did read excellent
> gdb/doc/gdb.ps, as well as mailing list archives), I did "configure
> --target=sparc-sun-linux" and "make".  The build failed at
> gdb/solib.c with errors like
> solib.c: In function `solib_map_sections':
> solib.c:369: structure has no member named `lm_addr'
> ...
> solib.c: In function `solib_add_common_symbols':
> solib.c:431: storage size of `inferior_rtc_symb' isn't known
> solib.c:458: `N_COMM' undeclared (first use in this function)

Try the current development sources.  I've made an effort in recent
months to make the shared library support buildable in a cross debugger
setting.  (If you still have problems with it, please let me know.)

See http://sources.redhat.com/gdb/#download for information on how
to get the current development sources.

> Does gdb support disassembling of binaries built for a target
> different from the host?

Yes.

> If yes, how should I build gdb? 

You're already doing it right.  I just did a test build for your target
using the current development sources and it worked fine...

[kev@mesquite sourceware-bld-x-sparc-sun-linux]$ gdb/gdb
GNU gdb 5.0
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-sun-linux".
(gdb) 

Kevin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cross-debugger build problem
  2001-04-02  9:23 ` Kevin Buettner
@ 2001-04-03 13:39   ` Baurjan Ismagulov
  2001-04-03 18:25     ` Kevin Buettner
  0 siblings, 1 reply; 4+ messages in thread
From: Baurjan Ismagulov @ 2001-04-03 13:39 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb

Kevin,

it works! Thank you very much!

And before trying that: would the method of remote debugging (described in section 13.4 of the manual) work with linux kernel on the remote end?

With kind regards,
Baurjan.

> Try the current development sources.  I've made an effort in recent
> months to make the shared library support buildable in a cross debugger
> setting.  (If you still have problems with it, please let me know.)
> 
> See http://sources.redhat.com/gdb/#download for information on how
> to get the current development sources.
> 
> [kev@mesquite sourceware-bld-x-sparc-sun-linux]$ gdb/gdb
> GNU gdb 5.0
> Copyright 2001 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-sun-linux".
> (gdb) 
> 
> Kevin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cross-debugger build problem
  2001-04-03 13:39   ` Baurjan Ismagulov
@ 2001-04-03 18:25     ` Kevin Buettner
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2001-04-03 18:25 UTC (permalink / raw)
  To: Baurjan Ismagulov; +Cc: gdb

On Apr 3, 11:38pm, Baurjan Ismagulov wrote:

> And before trying that:  would the method of remote debugging
> (described in section 13.4 of the manual) work with linux kernel on
> the remote end?

It can.  See arch/sparc/kernel/sparc-stub.c in the Linux kernel sources.

Kevin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-03 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-31 13:51 cross-debugger build problem Baurjan Ismagulov
2001-04-02  9:23 ` Kevin Buettner
2001-04-03 13:39   ` Baurjan Ismagulov
2001-04-03 18:25     ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox