This is the mail archive of the
mailing list for the GDB project.
Switching architectures from a remote target
- From: Robert Barnes <robcb85 at gmail dot com>
- To: gdb at sourceware dot org
- Date: Thu, 4 Feb 2010 12:38:29 -0700
- Subject: Switching architectures from a remote target
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
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?