From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9381 invoked by alias); 12 Feb 2010 19:10:16 -0000 Received: (qmail 9363 invoked by uid 22791); 12 Feb 2010 19:10:15 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Feb 2010 19:10:11 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 2B5BF51076; Fri, 12 Feb 2010 11:10:10 -0800 (PST) Received: from [10.20.124.101] (promd-2s-dhcp101.eng.vmware.com [10.20.124.101]) by jupiter.vmware.com (Postfix) with ESMTP id 200CDDC34B; Fri, 12 Feb 2010 11:10:10 -0800 (PST) Message-ID: <4B75A790.6010805@vmware.com> Date: Fri, 12 Feb 2010 19:10:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Pedro Alves CC: "gdb@sourceware.org" , "Paragi, Ajeykumar B" , "gdb@gnu.org" Subject: Re: gdb command line option -e or -exec usage References: <4B75A1AD.20908@vmware.com> <201002121858.11192.pedro@codesourcery.com> In-Reply-To: <201002121858.11192.pedro@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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/msg00103.txt.bz2 Pedro Alves wrote: > 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". > Right! Thanks, Pedro.