From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 838 invoked by alias); 11 Jul 2007 19:11:15 -0000 Received: (qmail 820 invoked by uid 22791); 11 Jul 2007 19:11:14 -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; Wed, 11 Jul 2007 19:11:12 +0000 Received: (qmail 9910 invoked from network); 11 Jul 2007 19:11:10 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Jul 2007 19:11:10 -0000 To: Wenbo Yang Cc: dave.tw@gmail.com, gdb@sourceware.org Subject: Re: RSP handling References: <1183949787.19182.ezmlm@sourceware.org> <4691C53B.8070903@simplnano.com> <4694726D.7030306@simplnano.com> From: Jim Blandy Date: Wed, 11 Jul 2007 19:11:00 -0000 In-Reply-To: <4694726D.7030306@simplnano.com> (Wenbo Yang's message of "Wed, 11 Jul 2007 14:02:21 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2007-07/txt/msg00095.txt.bz2 Wenbo Yang writes: >> but something is strange after the connection created. I set a >> breakpoint in the main function (br main), but after the connection >> created the gdb stop at the first instruction of crt0.S. > Is there anything wrong? Your stub gave GDB where the PC pointed to, > and GDB printed it out with source code accordingly. You didn't start > debugging, you were just attaching to the target. The PC you got > should be the saved PC value while enter exception handler(stub). It > has little meaning, you can go ahead by "continue". Right. When you connect to a target via the remote protocol, GDB treats that as connecting to a program that's already running; it's showing you the location where it's currently stopped.