From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 551 invoked by alias); 14 May 2008 07:43:06 -0000 Received: (qmail 543 invoked by uid 22791); 14 May 2008 07:43:06 -0000 X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.246) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 May 2008 07:42:48 +0000 Received: by rv-out-0708.google.com with SMTP id b17so3163378rvf.48 for ; Wed, 14 May 2008 00:42:47 -0700 (PDT) Received: by 10.142.156.2 with SMTP id d2mr289696wfe.219.1210750966893; Wed, 14 May 2008 00:42:46 -0700 (PDT) Received: by 10.142.136.11 with HTTP; Wed, 14 May 2008 00:42:46 -0700 (PDT) Message-ID: <40a670230805140042m311ccf04xb948628d0fa4532c@mail.gmail.com> Date: Wed, 14 May 2008 07:43:00 -0000 From: "Roman Mashak" To: gdb@sourceware.org Subject: gdb for AT91SAM7 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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: 2008-05/txt/msg00105.txt.bz2 Hello. My question concerns to debugging of embedded code on AT91SAM7 targets. Briefly about the background of the problem: 1) I'm using gdb-6.8.50.20080308-cvs 2) toolchain is based on gcc-4.2.2 for Windows 3) JTAG is by Segger, they also provide GDB server What I'm trying to do is to debug step-by-step the C-startup, written in ARM assembly language in order to clearly understand the process of chip initialization, peripheral setup and other low-level stuffs. I compiled C-startup and my simple application (printing string out of the USRT), with "-gdwarf-2 -O0" options as recommended. Then I run gdb, attach to the target. Since the application is linked to 0x100000 I set breakpoint on this address: #arm-elf-gdb main.elf #target remote localhost:2331 #break *0x100000 #continue Continuing. ... At this point it hangs and doesn't step over. But if I do "jump *0x100000" right after setting up the breakpoint, it works! This is kind of strange, isn't it? Are there any explanations to this? Or such behavior is rather sane? Thank you in advance for your comments! -- Roman