From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11142 invoked by alias); 12 Feb 2010 18:58:19 -0000 Received: (qmail 11132 invoked by uid 22791); 12 Feb 2010 18:58:19 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Feb 2010 18:58:13 +0000 Received: (qmail 22043 invoked from network); 12 Feb 2010 18:58:11 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Feb 2010 18:58:11 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: gdb command line option -e or -exec usage Date: Fri, 12 Feb 2010 18:58:00 -0000 User-Agent: KMail/1.9.10 Cc: Michael Snyder , "Paragi, Ajeykumar B" , "gdb@gnu.org" References: <4B75A1AD.20908@vmware.com> In-Reply-To: <4B75A1AD.20908@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002121858.11192.pedro@codesourcery.com> 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: 2010-02/txt/msg00101.txt.bz2 On Friday 12 February 2010 18:45:01, Michael Snyder wrote: > Paragi, Ajeykumar B wrote: > > Hi, > > > > I have invoked gdb with '-e' command line option on an executable, > > The gdb manual says '-e' is used to set the executable to run. > > But I could not see the symbols read in by gdb when I use -e and could > > not insert breakpoints. > > > > What is the intent of having the command line option "-e" or "-exec"? > > Hmmm, it does seem to be broken. It's not. `-e' is equivalent to "(gdb) exec-file". It doesn't read its argument for symbols, only for executable to run, or for pure memory contents. > > You can get the same effect, though, by just leaving out the -e flag. > > % gdb my-executable That's equivalent to "(gdb) file", which is equivalent to "gdb -e my-executable -s my-executable", or just "gdb -se my-executable". -- Pedro Alves