From: Pedro Alves <pedro@codesourcery.com>
To: Venkata Subbarao <venk2ksubbu@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: gdbserver "load" command
Date: Tue, 18 May 2010 15:22:00 -0000 [thread overview]
Message-ID: <201005181621.58874.pedro@codesourcery.com> (raw)
In-Reply-To: <AANLkTilglg1v1tJta4IeTysfOoV1py9KKfEOW9JXb3Zk@mail.gmail.com>
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
next prev parent reply other threads:[~2010-05-18 15:22 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 [this message]
2010-05-20 14:08 ` Venkata Subbarao
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=201005181621.58874.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=venk2ksubbu@gmail.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