From: Jan Kiszka <jan.kiszka@siemens.com>
To: Hui Zhu <teawater@gmail.com>
Cc: Robert Barnes <robcb85@gmail.com>, gdb@sourceware.org
Subject: Re: Switching architectures from a remote target
Date: Fri, 05 Feb 2010 12:29:00 -0000 [thread overview]
Message-ID: <4B6C0F15.4030006@siemens.com> (raw)
In-Reply-To: <daef60381002042250i583cd5f1v206eaa87c7ae5007@mail.gmail.com>
Hui Zhu wrote:
> Try "set architecture"
> But I don't have a inferior that can change bit when it's debug. I
> don't sure if it works or not.
qemu's gdbstub is an example for such a scenario. It currently switches
the arch dynamically when the guest moves from 32 to 64 bit mode and
vice versa. Not nice, but the best we can do until someone (us included)
finds the time to fix x86 gdb.
Jan
>
> On Fri, Feb 5, 2010 at 03:38, Robert Barnes <robcb85@gmail.com> wrote:
>> I am using GDB to interface with a remote target over serial. The
>> target architecture changes during execution (e.g. 32-bit to 64-bit).
>> When the architecture changes I need gdb to change its internal
>> representation of the remote architecture at the same time. The
>> primary problem is the remote 'g' command, it's return packet size is
>> determined by the initial call. When the architecture changes, the
>> size and number of registers may change, thus the size of the 'g'
>> packet changes. Yet gdb is still expecting the old size.
>>
>> This problem is addressed in section 7 of "Multi-arching Insights and
>> GDB" by Andrew Cagney
>> (http://www.gnu.org/software/gdb/papers/multi-arch/real-multi-arch/).
>> As far as I can tell the recommendations haven't been implemented.
>>
>> Are there any workarounds or solutions to the general problem of
>> handling changing architectures on a remote target?
>>
>> Thanks!
>>
>> -Rob
>>
>
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2010-02-05 12:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 19:38 Robert Barnes
2010-02-05 6:50 ` Hui Zhu
2010-02-05 12:29 ` Jan Kiszka [this message]
2010-02-09 18:40 ` Robert Barnes
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=4B6C0F15.4030006@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=gdb@sourceware.org \
--cc=robcb85@gmail.com \
--cc=teawater@gmail.com \
/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