From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10513 invoked by alias); 18 May 2010 15:22:10 -0000 Received: (qmail 10505 invoked by uid 22791); 18 May 2010 15:22:09 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Tue, 18 May 2010 15:22:04 +0000 Received: (qmail 24949 invoked from network); 18 May 2010 15:22:02 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 May 2010 15:22:02 -0000 From: Pedro Alves To: Venkata Subbarao Subject: Re: gdbserver "load" command Date: Tue, 18 May 2010 15:22:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-21-generic; KDE/4.3.2; x86_64; ; ) Cc: gdb@sourceware.org References: <201005171017.17564.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005181621.58874.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-05/txt/msg00053.txt.bz2 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. "load" only makes sense for embedded debugging --- it copies the program straight into the target's memory. When 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. After that, tell gdbserver which program to run with "(gdb) set remote exec-file myprog". Then you can just type "run" to launch a new process, just like you were debugging natively. If you instead start gdbserver like so: $ 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. It doesn't make much sense to use "load" when debugging a unix-like process. -- Pedro Alves