Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* crosstool gdb6.6 from i686 to x86_64
@ 2007-04-02 22:04 Sri Dharmasanam (sdharmas)
  2007-04-02 22:26 ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: Sri Dharmasanam (sdharmas) @ 2007-04-02 22:04 UTC (permalink / raw)
  To: gdb

I'm seeing this problem with gdb6.6 built using crosstool 0.43
 
host is a typical linux i686 system and the target is x86_64 smp linux
2.6.10.
 
The compiler version is 4.1.1 and binutils 2.16.
 
on the target, when I try remote debug:
 
%target% (gdb) target remote tcp:target_ipaddr:12312
Remote debugging using tcp:target_ipaddr:12312
Remote register badly formatted:
T0506:b0f3ffbf7f000000;07:f0f2ffbf7f000000;10:358170962a000000;
here: f000000;07:f0f2ffbf7f000000;10:358170962a000000;

 
on the host, I get:
./gdbserver hostipaddr:12312 --attach 2826
Attached; pid = 2826
Listening on port 12312
Remote debugging from host ipaddr
readchar: Got EOF
Remote side has terminated connection.  GDBserver will reopen the
connection.
Listening on port 12312


Any ideas what's wrong with my setup?

Thanks


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

* Re: crosstool gdb6.6 from i686 to x86_64
  2007-04-02 22:04 crosstool gdb6.6 from i686 to x86_64 Sri Dharmasanam (sdharmas)
@ 2007-04-02 22:26 ` Michael Snyder
  2007-04-02 23:15   ` Sri Dharmasanam (sdharmas)
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2007-04-02 22:26 UTC (permalink / raw)
  To: Sri Dharmasanam (sdharmas); +Cc: gdb

On Mon, 2007-04-02 at 15:04 -0700, Sri Dharmasanam (sdharmas) wrote:
> I'm seeing this problem with gdb6.6 built using crosstool 0.43
>  
> host is a typical linux i686 system and the target is x86_64 smp linux
> 2.6.10.
>  
> The compiler version is 4.1.1 and binutils 2.16.
>  
> on the target, when I try remote debug:
>  
> %target% (gdb) target remote tcp:target_ipaddr:12312
> Remote debugging using tcp:target_ipaddr:12312
> Remote register badly formatted:
> T0506:b0f3ffbf7f000000;07:f0f2ffbf7f000000;10:358170962a000000;
> here: f000000;07:f0f2ffbf7f000000;10:358170962a000000;
> 
>  
> on the host, I get:
> ./gdbserver hostipaddr:12312 --attach 2826
> Attached; pid = 2826
> Listening on port 12312
> Remote debugging from host ipaddr
> readchar: Got EOF
> Remote side has terminated connection.  GDBserver will reopen the
> connection.
> Listening on port 12312
> 
> 
> Any ideas what's wrong with my setup?

Traditionally we speak of the machine running gdbserver as the target, 
and the machine running gdb as the host.  To make sure we are on the
same page -- you are running gdb on an i686 machine and gdbserver
on an x86_64 machine.  Correct?

How is gdb configured?  When you start gdb, it should tell you 
something like:

This GDB was configured as "--host=i386-pc-linux-gnu
--target=x86_64-linux.

Your error message may suggest that gdb expects the target to 
have 32 bit registers instead of 64.  Are you sure you are not
using the native i686 gdb?



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

* RE: crosstool gdb6.6 from i686 to x86_64
  2007-04-02 22:26 ` Michael Snyder
@ 2007-04-02 23:15   ` Sri Dharmasanam (sdharmas)
  2007-04-03  1:23     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Sri Dharmasanam (sdharmas) @ 2007-04-02 23:15 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

Crosstool builds the cross-gdb client and the gdbserver together. In
this case, the host is a 32b machine and the target is 64b. 

The host:

% x86_64-unknown-linux-gnu-gdb
GNU gdb 6.6
Copyright (C) 2006 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=x86_64-unknown-linux-gnu".
(gdb) target remote target:12312
Remote debugging using target:12312
Remote register badly formatted:
T0506:0000000000000000;07:c0f4ffbf7f000000;10:806a55952a000000;
here: 0000000;07:c0f4ffbf7f000000;10:806a55952a000000;



The target:
% gdbserver ipadd:12312 --attach /usr/local/appln
Process /usr/local/appln created; pid = 529
Listening on port 12312
Remote debugging from host 
readchar: Got EOF
Remote side has terminated connection.  GDBserver will reopen the
connection.
Listening on port 12312

Yes, it does seem like the gdb client on the host thinks its talking to
a 32b instead of the 64b machine. But the config options reported by the
client look ok. 




> -----Original Message-----
> From: Michael Snyder [mailto:Michael.Snyder@access-company.com] 
> Sent: Monday, April 02, 2007 3:26 PM
> To: Sri Dharmasanam (sdharmas)
> Cc: gdb@sourceware.org
> Subject: Re: crosstool gdb6.6 from i686 to x86_64
> 
> On Mon, 2007-04-02 at 15:04 -0700, Sri Dharmasanam (sdharmas) wrote:
> > I'm seeing this problem with gdb6.6 built using crosstool 0.43
> >  
> > host is a typical linux i686 system and the target is 
> x86_64 smp linux 
> > 2.6.10.
> >  
> > The compiler version is 4.1.1 and binutils 2.16.
> >  
> > on the target, when I try remote debug:
> >  
> > %target% (gdb) target remote tcp:target_ipaddr:12312 Remote 
> debugging 
> > using tcp:target_ipaddr:12312 Remote register badly formatted:
> > T0506:b0f3ffbf7f000000;07:f0f2ffbf7f000000;10:358170962a000000;
> > here: f000000;07:f0f2ffbf7f000000;10:358170962a000000;
> > 
> >  
> > on the host, I get:
> > ./gdbserver hostipaddr:12312 --attach 2826 Attached; pid = 2826 
> > Listening on port 12312 Remote debugging from host ipaddr
> > readchar: Got EOF
> > Remote side has terminated connection.  GDBserver will reopen the 
> > connection.
> > Listening on port 12312
> > 
> > 
> > Any ideas what's wrong with my setup?
> 
> Traditionally we speak of the machine running gdbserver as 
> the target, and the machine running gdb as the host.  To make 
> sure we are on the same page -- you are running gdb on an 
> i686 machine and gdbserver on an x86_64 machine.  Correct?
> 
> How is gdb configured?  When you start gdb, it should tell 
> you something like:
> 
> This GDB was configured as "--host=i386-pc-linux-gnu 
> --target=x86_64-linux.
> 
> Your error message may suggest that gdb expects the target to 
> have 32 bit registers instead of 64.  Are you sure you are 
> not using the native i686 gdb?
> 


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

* Re: crosstool gdb6.6 from i686 to x86_64
  2007-04-02 23:15   ` Sri Dharmasanam (sdharmas)
@ 2007-04-03  1:23     ` Daniel Jacobowitz
  2007-04-03  1:42       ` Sri Dharmasanam (sdharmas)
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-04-03  1:23 UTC (permalink / raw)
  To: Sri Dharmasanam (sdharmas); +Cc: Michael Snyder, gdb

On Mon, Apr 02, 2007 at 04:15:15PM -0700, Sri Dharmasanam (sdharmas) wrote:
> Crosstool builds the cross-gdb client and the gdbserver together. In
> this case, the host is a 32b machine and the target is 64b. 
> 
> The host:
> 
> % x86_64-unknown-linux-gnu-gdb
> GNU gdb 6.6
> Copyright (C) 2006 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=x86_64-unknown-linux-gnu".
> (gdb) target remote target:12312
> Remote debugging using target:12312
> Remote register badly formatted:
> T0506:0000000000000000;07:c0f4ffbf7f000000;10:806a55952a000000;

Supply a file before you do this, and it will work.  Without a file,
x86_64 GDB defaults to i386.

-- 
Daniel Jacobowitz
CodeSourcery


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

* RE: crosstool gdb6.6 from i686 to x86_64
  2007-04-03  1:23     ` Daniel Jacobowitz
@ 2007-04-03  1:42       ` Sri Dharmasanam (sdharmas)
  0 siblings, 0 replies; 5+ messages in thread
From: Sri Dharmasanam (sdharmas) @ 2007-04-03  1:42 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Michael Snyder, gdb

That was it. Thanks; saved me from burning more time on this. 

> -----Original Message-----
> From: Daniel Jacobowitz [mailto:drow@false.org] 
> Sent: Monday, April 02, 2007 6:23 PM
> To: Sri Dharmasanam (sdharmas)
> Cc: Michael Snyder; gdb@sourceware.org
> Subject: Re: crosstool gdb6.6 from i686 to x86_64
> 
> On Mon, Apr 02, 2007 at 04:15:15PM -0700, Sri Dharmasanam 
> (sdharmas) wrote:
> > Crosstool builds the cross-gdb client and the gdbserver 
> together. In 
> > this case, the host is a 32b machine and the target is 64b.
> > 
> > The host:
> > 
> > % x86_64-unknown-linux-gnu-gdb
> > GNU gdb 6.6
> > Copyright (C) 2006 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=x86_64-unknown-linux-gnu".
> > (gdb) target remote target:12312
> > Remote debugging using target:12312
> > Remote register badly formatted:
> > T0506:0000000000000000;07:c0f4ffbf7f000000;10:806a55952a000000;
> 
> Supply a file before you do this, and it will work.  Without a file,
> x86_64 GDB defaults to i386.
> 
> --
> Daniel Jacobowitz
> CodeSourcery
> 


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

end of thread, other threads:[~2007-04-03  1:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-02 22:04 crosstool gdb6.6 from i686 to x86_64 Sri Dharmasanam (sdharmas)
2007-04-02 22:26 ` Michael Snyder
2007-04-02 23:15   ` Sri Dharmasanam (sdharmas)
2007-04-03  1:23     ` Daniel Jacobowitz
2007-04-03  1:42       ` Sri Dharmasanam (sdharmas)

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