Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "M R Swami Reddy" <MR.Swami.Reddy@nsc.com>
To: "ranjith kumar" <ranjithproxy@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: executing shell commands at gdb prompt
Date: Tue, 16 Sep 2008 10:23:00 -0000	[thread overview]
Message-ID: <48CF8938.4030208@nsc.com> (raw)
In-Reply-To: <31cff80d0809160318m7d6df1dbr89979d4f18c3a77f@mail.gmail.com>



ranjith kumar wrote:
> Hi,
>             I am new to gdb.
> I want to know is there any way to execute shell commands (like ls, ps
> .......)  at  gdb  command prompt??
> 
> Suppose if I want to know list of files in current directory while
> running "gdb", I have to open another shell to know it. Without
> opening it, is it possible to execute "ls " command at gdb command
> prompt??

Yes, you can do it. See below "shell command" in gdb prompt.
==
(gdb) help shell
Execute the rest of the line as a shell command.
With no arguments, run an inferior shell.
(gdb) shell ls
==

Best Regards
Swami


      reply	other threads:[~2008-09-16 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 10:18 ranjith kumar
2008-09-16 10:23 ` M R Swami Reddy [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=48CF8938.4030208@nsc.com \
    --to=mr.swami.reddy@nsc.com \
    --cc=gdb@sourceware.org \
    --cc=ranjithproxy@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