I am trying to debug (a simple Hello World application without errors for testing) on a remote 64-bit machine with a 64-bit Intel processor.
I ran
gcc -g -o cexecute cexecute.c gdbserver localhost:2345 cexecute
on the remote computer.
After I move the local port of laptop 2345 to the same remote port, run gdb and type
target remote localhost:2345
I get:
GNU gdb (GDB) 7.5-ubuntu Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. (gdb) target remote localhost:2345 Remote debugging using localhost:2345 warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration of GDB. Attempting to continue with the default i386:x86-64 settings. warning: Architecture rejected target-supplied description Remote register badly formatted: T0506:0000000000000000;07:e0dbffffff7f0000;10:c0b6ddf7ff7f0000;thread:p64bc.64bc;core:6; here: 00000000;07:e0dbffffff7f0000;10:c0b6ddf7ff7f0000;thread:p64bc.64bc;core:6;
I am confused since I worked on this before. A similar question for the inverse problem (a 32-bit application from a 64-bit machine), which are advised to run set architecture : Remote debugging error using GDB
I tried this with various arguments and without success. Also the target platform type i386:x86-64 seems to be correct. Both machines run ubuntu linux. Since I successfully started gdb for the last time, I installed version updates on both machines. Where is the mistake?
source share