This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Can't get cross debugging to work
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Tuesday, March 13, 2012 3:57 PM
> To: Marc Khouzam
> Cc: 'gdb@sourceware.org'
> Subject: Re: Can't get cross debugging to work
>
> On 03/13/2012 07:47 PM, Marc Khouzam wrote:
>
> > Run:
> >> > ./gdb/gdbserver/gdbserver :9999 ~/myBin.64
>
>
> > Run:
> >> > ./gdb/gdb ~/myBin.32
>
>
> Here's the problem. You should be doing:
>
> ./gdb/gdb ~/myBin.64
>
> > warning: Selected architecture i386 is not compatible with
> reported target architecture i386:x86-64
> > warning: Architecture rejected target-supplied description
>
> This means that GDB thinks the architecture is i386 (because
> you've gave it a 32-bit
> executable to debug), while gdbserver claims it is debugging
> a x86-64 program.
And it works! Thanks for the quick answer.
I'd like to see the --enable-targets feature explained better
in the documentation. I'll try to find time and write a patch,
but I don't understand much of it, so it will be to get the ball
rolling.
Thanks again!
Marc