From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22539 invoked by alias); 3 Nov 2002 13:54:14 -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 22443 invoked from network); 3 Nov 2002 13:54:13 -0000 Received: from unknown (HELO dell.zee2.com) (64.220.118.172) by sources.redhat.com with SMTP; 3 Nov 2002 13:54:13 -0000 Received: from zee2.com (localhost [127.0.0.1]) by dell.zee2.com (8.11.6/8.11.6) with ESMTP id gA3DsCd19425 for ; Sun, 3 Nov 2002 08:54:12 -0500 Message-ID: <3DC52A84.18B7BF92@zee2.com> Date: Sun, 03 Nov 2002 05:54:00 -0000 From: Stuart Hughes Organization: Zee2 Ltd X-Accept-Language: en MIME-Version: 1.0 To: gdb Subject: software single step Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00020.txt.bz2 Hi, I'm trying to use gdb/gdbserver to debug a strong-arm target. I'm having problems with single stepping. If I try to step into the loop shown below, it simply runs on printing all 10 loop iterations. for ( i = 0; i < 10 ; i++ ) { printf("loop count = %d\n", i); } If I disassemble, the problem seems to be the branch instructions, the loop control looks like: 0x83c4 : cmp r3, #9 ; 0x9 0x83c8 : ble 0x83d0 0x83cc : b 0x83ec 0x83d0 : ldr r0, [pc, #60] ; 0x8414 To investigate this further, I built a "native" gdb for the strong-arm from the same code gdb code base. This worked correectly, I was able to step into and control the flow through the loop. It seems as though the problem is that gdbserver is implementing software_single_step differently to a "native" gdb. Has anyone else seen this problem ? Does anyone know of a work around, or a fix ? TIA, Stuart. BTW: my environment is: gdb/gdbserver - 5.2 or 5.3 CVS (same behaviour) linux - 2.4.18 gcc - 2.95.3 or 3.1 (same behaviour)