From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25257 invoked by alias); 23 Jan 2002 09:56:21 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25223 invoked from network); 23 Jan 2002 09:56:17 -0000 Received: from unknown (HELO atlas.acter.ch) (212.126.160.108) by sources.redhat.com with SMTP; 23 Jan 2002 09:56:17 -0000 Received: (from avbidder@localhost) by atlas.acter.ch (8.11.6/8.11.6/SuSE Linux 0.5) id g0N9uD210990; Wed, 23 Jan 2002 10:56:13 +0100 X-Authentication-Warning: atlas.acter.ch: avbidder set sender to avbidder@acter.ch using -f Subject: [arm] force gdb into disassembling in thumb (arm) mode From: Adrian von Bidder To: gdb mailing list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution/0.99.2 (Preview Release) Date: Wed, 23 Jan 2002 01:56:00 -0000 Message-Id: <1011779773.10599.4.camel@atlas> Mime-Version: 1.0 X-SW-Source: 2002-01/txt/msg00255.txt.bz2 Heyho! [May have been asked before - just point me in the general direction as I couldn't find it with google or in the mailing lsit archive] How can I force gdb to disassemble a memory region in thumb? gdb 5.1 gets it right if there is symbol information, but just disassembles to arm instructions when no symbol information is present (apparently). Can I change this default to thumb (runtime), or is it possible with a argument to the x/i command? The sensible way (imho) would be to interpret the (h)alfword/(w)ord format letters, so that x/ih and x/iw would force to interpret 16/32 bit instructions. x/i on an odd address currently does switch to thumb mode - but it seems to interpret the instructions at the odd address (it doesn't strip the lsb when loading the data): (gdb) x/20i 0xbe1 0xbe1: ldrsh r5, [r6, r6] 0xbe3: strb r6, [r0, r5] 0xbe5: ldr r4, [pc, #280] (0xd00) 0xbe7: add sp, #280 0xbe9: undefined instruction 0x47b4 0xbeb: strh r6, [r0, #2] but the halfword at 0xbe0 does (in this example) disassemble to=20 ldr r7,[sp, #0xb5]. greets from Z=FCrich -- vbi