Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Venkata Subbarao <venk2ksubbu@gmail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb@sourceware.org
Subject: Re: gdbserver "load" command
Date: Thu, 20 May 2010 14:08:00 -0000	[thread overview]
Message-ID: <AANLkTikoU_fGvLdI-YAFgx59IpUEk-RsDFkHYzcBzN9w@mail.gmail.com> (raw)
In-Reply-To: <201005181621.58874.pedro@codesourcery.com>

Thank you very much.

--Subbarao

On Tue, May 18, 2010 at 8:51 PM, Pedro Alves <pedro@codesourcery.com> 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.  "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
>


      reply	other threads:[~2010-05-20 14:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17  7:38 Venkata Subbarao
2010-05-17  9:17 ` Pedro Alves
2010-05-18 15:05   ` Venkata Subbarao
2010-05-18 15:22     ` Pedro Alves
2010-05-20 14:08       ` Venkata Subbarao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikoU_fGvLdI-YAFgx59IpUEk-RsDFkHYzcBzN9w@mail.gmail.com \
    --to=venk2ksubbu@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox