Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Marc Khouzam <marc.khouzam@ericsson.com>
To: "'gdb@sourceware.org'" <gdb@sourceware.org>
Subject: Can't get cross debugging to work
Date: Tue, 13 Mar 2012 19:47:00 -0000	[thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC5790B29476@EUSAACMS0703.eamcs.ericsson.se> (raw)

Hi,

I've been breaking my head trying to figure out the recipe
to cross debug from a Linux 32bit to a Linux 64bit.  Can't do it.
Could someone be kind enough to confirm the steps?
Do I need to 'set architecture'?
Do I need to 'set osabi'?

Target:
> uname -a
Linux toside-linux64 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

Compile gdbserver like this:
> cd gdb/build;../configure && make

Run:
> ./gdb/gdbserver/gdbserver :9999 ~/myBin.64

Host:
> uname -a
Linux toside-linux32 2.6.16.60-0.27-smp #1 SMP Mon Jul 28 13:07:19 UTC 2008 i686 i686 i386 GNU/Linux

Compile gdb like this:
> cd gdb/build; ../configure --enable-targets=x86_64-unknown-linux-gnu && make

Run:
> ./gdb/gdb ~/myBin.32

GNU gdb (GDB) 7.4
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /project/lmimtdesign/lmckhou/myBin.32...done.
(gdb) tar remote toside-linux64:9998
Remote debugging using toside-linux64:9998

warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64
warning: Architecture rejected target-supplied description
Remote register badly formatted: T0506:0000000000000000;07:90cbffffff7f0000;10:80baaaaaaa2a0000;thread:66c7;core:0;
here: 00000000;07:90cbffffff7f0000;10:80baaaaaaa2a0000;thread:66c7;core:0;

==

I've tried setting the architecture, I've tried building with --target instead of --enable-targets,
I've tried different names for the target (where are those defined anyway?), I've tried using
--enable-targets=all.  Nothing works. Sigh.

Thanks in advance

Marc


             reply	other threads:[~2012-03-13 19:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 19:47 Marc Khouzam [this message]
2012-03-13 19:57 ` Pedro Alves
2012-03-13 20:03   ` Marc Khouzam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F7CE05678329534C957159168FA70DEC5790B29476@EUSAACMS0703.eamcs.ericsson.se \
    --to=marc.khouzam@ericsson.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox