qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
To: Artyom Tarasenko <atar4qemu@googlemail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] gdb for sparc64?
Date: Fri, 03 Sep 2010 10:11:04 +0100	[thread overview]
Message-ID: <4C80BBA8.60405@siriusit.co.uk> (raw)
In-Reply-To: <AANLkTimQcxNuscZWfWg9H743uGJ3Crk18HXppQLGWVc3@mail.gmail.com>

Artyom Tarasenko wrote:

> Does any gdb version work with current qemu-system-sparc64 ?
> 
> I tried 7.1 and 6.8 with --target=sparc64-linux and --target=sparc64
> And result seems to be pretty much the same:
> 
> 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=x86_64-unknown-linux-gnu
> --target=sparc64-linux".
> (gdb) target remote :1234
> Remote debugging using :1234
> [New Thread 1]
> Remote 'g' packet reply is too long:
> 0000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000001fff0000020000001fff00000240000000000003507000000000000000000000000000000000000000000000000
> (gdb)
> 
> Regards,
> Artyom Tarasenko

Hi Artyom,

In order to use gdb with OpenBIOS on SPARC64, you need to build gdb with 
--target=sparc64-linux and then point it towards a 64-bit image with 
"file" in order to prevent the "Remote 'g' packet reply" error, e.g.

build@zeno:~/src/openbios/openbios-devel$ sparc64-linux-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=x86_64-unknown-linux-gnu 
--target=sparc64-linux".
(gdb) target remote :1234
Remote debugging using :1234
[New Thread 1]
Remote 'g' packet reply is too long: 
000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001fff0000020000001fff00000240000000000003507000000000000000000000000000000000000000000000000
(gdb) file obj-sparc64/openbios-builtin.elf.nostrip
Reading symbols from 
/home/build/src/openbios/openbios-devel/obj-sparc64/openbios-builtin.elf.nostrip...done.
(gdb) target remote :1234
Remote debugging using :1234
[New Thread 1]
0x000001fff0000020 in ?? ()
(gdb) cont
Continuing.

...and then off you go. I don't know whether this is a bug/feature in 
the QEMU gdb stubs or just GDB itself.


HTH,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs

  reply	other threads:[~2010-09-03  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 17:47 [Qemu-devel] gdb for sparc64? Artyom Tarasenko
2010-09-03  9:11 ` Mark Cave-Ayland [this message]
2010-09-04  5:56   ` Igor Kovalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C80BBA8.60405@siriusit.co.uk \
    --to=mark.cave-ayland@siriusit.co.uk \
    --cc=atar4qemu@googlemail.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).