Ho provato a eseguire il debug remoto di un'applicazione a 32 bit su xux64 x64 suse, ma ottenere questo errore "registro remoto formattato male".Errore di debug remoto con GDB
comincio la gdbserver come in ascolto sulla porta 12345 (gdbserver localhost: 12345 My_Prog)
e questo è l'errore:
$ 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 "x86_64-suse-linux".
(gdb) target remote <ip>:12345
Remote debugging using <ip>:12345
Remote register badly formatted: T0506:0000000000000000;07:80b8bcff00000000;10:4028f0f700000000;
here: 0000000;07:80b8bcff00000000;10:4028f0f700000000;
(gdb)
Questa è la macchina server di debug (uname -a):
server Linux 2.6.16.60-0.31-SMP # 1 SMP mar 7 ottobre 16:16:29 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
E questa è la macchina client di debug (uname -a):
client Linux 2.6.16.54-0.2.5-default # 1 Lun 21 Gen 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
Entrambe le macchine sono in esecuzione su macchine virtuali anche se (VMWare). Il file binario gdbserver viene copiato dal computer client al computer server.
(I debug remoto perché l'ambiente di runtime sul server di debug è la produzione simile, e non contiene strumenti di sviluppo, l'accesso al codice sorgente, ecc)
Eventuali suggerimenti sono i benvenuti.
UPDATE: questo ha lavorato per me emettendo il seguente comando in gdb:
insieme architettura i386: x86-64
Dice i386 (auto). In realtà, quando imposto arch su "i386: x86-64: intel", si avvia senza il messaggio di errore, ma quando provo ad inserire il codice, mi dà: "Impossibile accedere alla memoria all'indirizzo 0x1f7fb5000". – boffman
È possibile eseguire l'intera operazione (gdbserver, gdb, app a 32 bit) sul computer client? Incontri gli stessi problemi? – sigjuice