Skip to contentSkip to conversation

Using GDB to debug the sparc64 target

Qemu-devel Jakub Jermar 3 participants 5 messages Jan 11, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I'd like to help with debugging the sparc64 target (to get HelenOS run on it). I'd like to use gdb for that purpose, however, I get the following error when I try to connect to qemu from gdb:

GNU gdb 6.8
Copyright (C) 2008 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 "--host=i686-pc-linux-gnu --target=sparc64-linux-gnu".
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
[New Thread 1]
Remote 'g' packet reply is too long: 00000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000001fff0000020000001fff00000240000000000000407000000000000000000000000000000000000000000000000

Is this a known issue? Is there a workaround for this? The qemu version I am running is trunk, the host is an ordinary ia32 system.

Thanks,
Jakub

#1 lore raw
Quoted 19 lines · Jakub Jermar

Hi,

I'd like to help with debugging the sparc64 target (to get HelenOS run on it). I'd like to use gdb for that purpose, however, I get the following error when I try to connect to qemu from gdb:

GNU gdb 6.8
Copyright (C) 2008 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 "--host=i686-pc-linux-gnu --target=sparc64-linux-gnu".
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
[New Thread 1]
Remote 'g' packet reply is too long: 00000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000001fff0000020000001fff00000240000000000000407000000000000000000000000000000000000000000000000

Quoted 3 lines

Is this a known issue? Is there a workaround for this? The qemu version I am running is trunk, the host is an ordinary ia32 system.

The register size is still incorrect (32 bits) in the GDB you produced. Also I can't make a working cross-gdb. The problem is on GDB
side: on Sparc64 OpenBSD, where everything is 64 bits, there is no problem and the protocol matches what Qemu produces.

I'd be happy to be proven wrong, though. Currently my OpenBSD setup is slightly broken, so this comes from memory.

#2 lore raw
In reply to Jakub Jermar
Quoted 4 lines · Jakub Jermar

I'd like to help with debugging the sparc64 target (to get HelenOS run on it). I'd like to use gdb for that purpose, however, I get the following error when I try to connect to qemu from gdb:

Quoted 11 lines

GNU gdb 6.8
Copyright (C) 2008 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 "--host=i686-pc-linux-gnu --target=sparc64-linux-gnu".
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
[New Thread 1]
Remote 'g' packet reply is too long: 000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

00

Quoted 1 line

00000000000000000000000000000000000000000000000000000000000000000000000000001fff0000020000001fff00000240000000000000407000000000000000000000000000000000000000000000000

Ok, I was able to solve this problem by:

set architecture sparc:v9

Thanks,
Jakub

#3 lore raw
Quoted 16 lines · Jakub Jermar
Quoted 4 lines · Jakub Jermar

I'd like to help with debugging the sparc64 target (to get HelenOS run on it). I'd like to use gdb for that purpose, however, I get the following error when I try to connect to qemu from gdb:

Quoted 11 lines

GNU gdb 6.8
Copyright (C) 2008 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 "--host=i686-pc-linux-gnu --target=sparc64-linux-gnu".
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
[New Thread 1]
Remote 'g' packet reply is too long: 000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Quoted 7 lines

00

Quoted 1 line

00000000000000000000000000000000000000000000000000000000000000000000000000001fff0000020000001fff00000240000000000000407000000000000000000000000000000000000000000000000

Ok, I was able to solve this problem by:

set architecture sparc:v9

Does not help here.

#4 lore raw
In reply to Jakub Jermar
Quoted 5 lines · Jakub Jermar

Jakub Jermar wrote:
Ok, I was able to solve this problem by:

set architecture sparc:v9

That's what solves that problem for me too.

Signature · 2 lines
Kind regards,
Igor V. Kovalenko