From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23199 invoked by alias); 4 Feb 2010 19:38:37 -0000 Received: (qmail 23191 invoked by uid 22791); 4 Feb 2010 19:38:36 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f223.google.com (HELO mail-ew0-f223.google.com) (209.85.219.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Feb 2010 19:38:33 +0000 Received: by ewy23 with SMTP id 23so48497ewy.4 for ; Thu, 04 Feb 2010 11:38:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.91.10 with SMTP id g10mr834531wef.217.1265312309947; Thu, 04 Feb 2010 11:38:29 -0800 (PST) Date: Thu, 04 Feb 2010 19:38:00 -0000 Message-ID: <23c0f921002041138k1d989b9cs8423911108499331@mail.gmail.com> Subject: Switching architectures from a remote target From: Robert Barnes To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00025.txt.bz2 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