From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20250 invoked by alias); 20 May 2010 14:08:01 -0000 Received: (qmail 20238 invoked by uid 22791); 20 May 2010 14:07:59 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-qy0-f194.google.com (HELO mail-qy0-f194.google.com) (209.85.221.194) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 14:07:52 +0000 Received: by qyk32 with SMTP id 32so6351738qyk.0 for ; Thu, 20 May 2010 07:07:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.79.102 with SMTP id o38mr27246qak.358.1274364470099; Thu, 20 May 2010 07:07:50 -0700 (PDT) Received: by 10.229.74.134 with HTTP; Thu, 20 May 2010 07:07:50 -0700 (PDT) In-Reply-To: <201005181621.58874.pedro@codesourcery.com> References: <201005171017.17564.pedro@codesourcery.com> <201005181621.58874.pedro@codesourcery.com> Date: Thu, 20 May 2010 14:08:00 -0000 Message-ID: Subject: Re: gdbserver "load" command From: Venkata Subbarao To: Pedro Alves Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-05/txt/msg00061.txt.bz2 Thank you very much. --Subbarao On Tue, May 18, 2010 at 8:51 PM, Pedro Alves wrote: > On Tuesday 18 May 2010 16:05:17, Venkata Subbarao wrote: >> Sorry, But how can I run without loading the file. > > You don't need to, and shouldn't use load when debugging > an unix like process. =A0"load" only makes sense for embedded > debugging --- it copies the program straight into the target's > memory. =A0When debugging on linux, or full blown OS, you want to > create a new process, and that's what "run" does. > >> I have tried with "remote put" and I have succeeded with it. > > That's good. =A0After that, tell gdbserver which program to run > with "(gdb) set remote exec-file myprog". =A0Then you can just > type "run" to launch a new process, just like you were > debugging natively. > > If you instead start gdbserver like so: > > =A0$ gdbserver :9999 myprog > > gdbserver will start the myprog program for you; This means > there'll already by a process running when you connect with > gdb. > >> But I >> wanted to use "load" followed by "continue" command. > > Don't. > >> I am also curious to know what actually happens when we say "load" >> command. Where does it dump the file contents ? > > To the debuggee/`inferior process' memory. =A0It doesn't make much sense > to use "load" when debugging a unix-like process. > > -- > Pedro Alves >