From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6251 invoked by alias); 7 Apr 2013 14:31:40 -0000 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 Received: (qmail 6242 invoked by uid 89); 7 Apr 2013 14:31:40 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from oarmail.oarcorp.com (HELO OARmail.OARCORP.com) (67.63.146.244) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 07 Apr 2013 14:31:38 +0000 Received: from [192.168.0.14] (24.96.88.41) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.2.255.0; Sun, 7 Apr 2013 09:31:31 -0500 Message-ID: <5161833A.5040707@oarcorp.com> Date: Sun, 07 Apr 2013 14:31:00 -0000 From: Joel Sherrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.3 MIME-Version: 1.0 To: ishare CC: "gdb@sourceware.org" Subject: Re: set debug entry point References: <20130407142128.GA11702@debian.localdomain> In-Reply-To: <20130407142128.GA11702@debian.localdomain> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00012.txt.bz2 On 04/07/2013 09:21 AM, ishare wrote: > > If one elf has no main , where does gdb start to trace it ? Every program has a starting point. main() is just the first user provided code that runs in a C program. Set up and initialization code has run before that. When the program was linked, it could have used a linker directive or the ld --entry argument to specify the entry symbol. > is there mothod to tell gdb start at specified address? gdb should start the program at the entry address. You can always set the program counter directly using something like set $pc XXX but that is architecture specific. > tks! -- Joel Sherrill, Ph.D. Director of Research& Development joel.sherrill@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35806 Support Available (256) 722-9985