This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdbserver and cross-debugging on x86_64


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;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]