From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18452 invoked by alias); 23 Jan 2012 01:29:10 -0000 Received: (qmail 18443 invoked by uid 22791); 23 Jan 2012 01:29:09 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_OV X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Jan 2012 01:28:57 +0000 Received: by qadc11 with SMTP id c11so1551154qad.0 for ; Sun, 22 Jan 2012 17:28:56 -0800 (PST) Received: by 10.224.192.10 with SMTP id do10mr6713093qab.50.1327282136257; Sun, 22 Jan 2012 17:28:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.100.14 with HTTP; Sun, 22 Jan 2012 17:28:34 -0800 (PST) In-Reply-To: References: <201201201044.q0KAimIE006755@d06av02.portsmouth.uk.ibm.com> From: Nicholas Sherlock Date: Mon, 23 Jan 2012 01:29:00 -0000 Message-ID: Subject: Re: ARM EABI Linux, breakpoints cause SIGILL and target dies To: Ulrich Weigand , gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 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-01/txt/msg00066.txt.bz2 So, I patched this line in infrun.c which is supposed to check that the SIGILL was caused by a breakpoint: if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), regcache_read_pc (regcache))) And changed it to: if (ecs->ws.value.sig == TARGET_SIGNAL_ILL || breakpoint_inserted_here_p (get_regcache_aspace (regcache), regcache_read_pc (regcache))) Now the signal is corrected reinterpreted as SIGTRAP: Program received signal SIGTRAP, Trace/breakpoint trap. 0x000081f6 in main () at test.c:4 4 printf("Hello, world!\n"); But the break address is incorrect, it's halfway through the code for calling printf: 81f4: f24b 60a4 movw r0, #46756 ; 0xb6a4 81f8: f2c0 0004 movt r0, #4 81fc: f000 fce8 bl 8bd0 <_IO_puts> So now I'm trying to fix the code for adjusting the PC after the trap. Cheers, Nicholas Sherlock