public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* gdbserver and cross-debugging on x86_64
@ 2005-06-27 22:36 Travis Newhouse
  0 siblings, 0 replies; only message in thread
From: Travis Newhouse @ 2005-06-27 22:36 UTC (permalink / raw)
  To: gdb

Hi.  Can anyone tell me whether there are known issues running
gdbserver on an x86_64 machine and cross-debugging with gdb 6.3?
The problem that I am seeing is that continuing or stepping
after a breakpoint stops on every line/instruction with a SIGTRAP.

The target platform is running dual AMD Opteron 64-bit processors
and Linux 2.6.9 kernel.  I am compiling with a crosstool-compiled
toolchain using gcc 3.4.1 and glibc 2.3.3.

I have included below a transcript of a sample session.  On the
target machine, the program to debug was started with:
  gdbserver ralph:7766 foo-64

Thanks for any insight,
Travis


$ /opt/tools/x86_64/gdb/x86_64-opteron-linux-gnu/bin/x86_64-opteron-linux-gnu-gdb /tmp/foo-64
GNU gdb 6.3
Copyright 2004 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=x86_64-unknown-linux-gnu --target=x86_64-opteron-linux-gnu"...
(gdb) target remote ralph:7766
Remote debugging using ralph:7766
0x0000002a95556c60 in ?? ()
(gdb) break add
Breakpoint 1 at 0x400472: file /tmp/foo.c, line 4.
(gdb) cont
Continuing.

Breakpoint 1, add (a=5, b=7) at /tmp/foo.c:4
4           i = a + b;
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000000000400478 in add (a=5, b=7) at /tmp/foo.c:4
4           i = a + b;
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
add (a=5, b=7) at /tmp/foo.c:5
5           return i;
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
add (a=5, b=7) at /tmp/foo.c:6
6       }
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x000000000040047f in add (a=5, b=7) at /tmp/foo.c:6
6       }
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000000004004a1 in main () at /tmp/foo.c:13
13          z = add(x,y);
(gdb) cont
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
main () at /tmp/foo.c:14
14          return 0;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-27 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-27 22:36 gdbserver and cross-debugging on x86_64 Travis Newhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).