From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5764 invoked by alias); 8 Feb 2012 10:34:42 -0000 Received: (qmail 5582 invoked by uid 22791); 8 Feb 2012 10:34:41 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,TW_QE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp2.ugent.be (HELO smtp2.UGent.be) (157.193.49.126) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Feb 2012 10:34:25 +0000 Received: from localhost (mcheck5.ugent.be [157.193.49.247]) by smtp2.UGent.be (Postfix) with ESMTP id 1677144A66A for ; Wed, 8 Feb 2012 11:34:24 +0100 (CET) Received: from smtp2.UGent.be ([157.193.49.126]) by localhost (mcheck5.UGent.be [157.193.43.11]) (amavisd-new, port 10024) with ESMTP id eroE7Of3se9j for ; Wed, 8 Feb 2012 11:34:23 +0100 (CET) Received: from mail.elis.ugent.be (mail.elis.UGent.be [157.193.206.48]) by smtp2.UGent.be (Postfix) with ESMTP id 3CC7044A65D for ; Wed, 8 Feb 2012 11:34:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.elis.ugent.be (Postfix) with ESMTP id D553AAA30043 for ; Wed, 8 Feb 2012 11:34:22 +0100 (CET) Received: from mail.elis.ugent.be ([127.0.0.1]) by localhost (mail.elis.ugent.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DttIz95492t8 for ; Wed, 8 Feb 2012 11:34:19 +0100 (CET) Received: from bigmac.elis.UGent.be (bigmac.elis.UGent.be [157.193.206.33]) by mail.elis.ugent.be (Postfix) with ESMTP id 291C2918F10 for ; Wed, 8 Feb 2012 11:34:19 +0100 (CET) Message-Id: <047D674A-A77C-4E5A-B207-592A81D857DC@elis.ugent.be> From: Jonas Maebe To: gdb@sourceware.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Debug ARM semihosting Thumb-2 binary Date: Wed, 08 Feb 2012 10:34:00 -0000 X-j-chkmail-Enveloppe: 4F324FAE.006 from mail.elis.UGent.be/mail.elis.UGent.be/157.193.206.48/mail.elis.ugent.be/ X-j-chkmail-Score: MSGID : 4F324FAE.006 on smtp2.UGent.be : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham X-IsSubscribed: yes 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: 2012-02/txt/msg00007.txt.bz2 Hi, I'm debugging ARM binaries compiled for the semihosting interface (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/CHDJHHDI.html ). The binaries run under qemu-system-arm and I'm using QEMU's gdb remote target interface. In general, this works fine, except when such binaries are Thumb-2 and perform system calls. The reason is that for Thumb-2, the system call interface of the semihosting platform uses "bkpt 0xab" (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/CJAFABBB.html ). GDB intercepts this bkpt, halts the execution with a SIGINT message and does not pass it on to the debugged process. If the process is then continued, it behaves as if the system call/bkpt in question never was executed Using "handle SIGINT pass" does not change this. Is there another way to tell gdb to ignore those particular bkpt instructions and execute them normally? I'm using gdb 7.4 (7.2 behaves the same). Thanks, Jonas