From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6110 invoked by alias); 20 Jun 2008 10:48:05 -0000 Received: (qmail 6098 invoked by uid 22791); 20 Jun 2008 10:48:05 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 20 Jun 2008 10:47:36 +0000 Received: (qmail 17959 invoked from network); 20 Jun 2008 10:47:34 -0000 Received: from unknown (HELO macbook-2.local) (stan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Jun 2008 10:47:34 -0000 Message-ID: <485B8AB9.9050806@codesourcery.com> Date: Fri, 20 Jun 2008 10:48:00 -0000 From: Stan Shebs User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Dmitry Smirnov CC: gdb@sourceware.org Subject: Re: THUMB code detection for ADS 1.2 ELF emages References: In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit 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: 2008-06/txt/msg00201.txt.bz2 Dmitry Smirnov wrote: > Hi, > > I'm trying to use GDB to work with ARM ELF images produced by ADS 1.2 (ARM toolchain, a liitle bit old). > I can do almost all I want with ARM code. But GDB works incorrectly with THUMB code: I cannot disassemle the code, GDB places breakpoints at incorrect address, stepping with 'ni'. > > In GDB source code I've found that it completely ignores some special symbols ($t, $a, $d ...) that ADS places to an ELF file. > Dan Jacobowitz added this bit of machinery recently; see http://sourceware.org/ml/gdb-patches/2008-05/msg00113.html . He points out that this should be a rare case, only needed if Arm and Thumb code are mixed within a single file; so if your GDB is having trouble detecting Thumb code, maybe there is some other problem, perhaps the toolchain is not marking the executable correctly? Stan