Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: kraftche@cae.wisc.edu, gdb@sources.redhat.com
Subject: Re: environment for 'shell' command
Date: Mon, 09 Sep 2002 13:23:00 -0000	[thread overview]
Message-ID: <20020909202306.GA8157@nevyn.them.org> (raw)
In-Reply-To: <3D7CEC52.3000504@ges.redhat.com>

On Mon, Sep 09, 2002 at 02:45:38PM -0400, Andrew Cagney wrote:
> >Hi,
> >
> >I would like the ability to pass the file name and line number of the
> >source corresponding to the selected stack frame to a program started
> >via the 'shell' command.  I could not find any way to do this in gdb. 
> >If there is a way to do this, please let me know (and disregard the rest
> >of this message.)  I decided to add this functionality but I am
> >unfimiliar with the internal workings of gdb.  The following is a
> >description of what I did to implement this.  I'd really appreciate any
> >suggestions on better ways to implement this, error conditions I'm not
> >handling, etc.
> 
> Off hand I can think of two ways to handle this:
> 
> -- extend what you've proposed by including commands to explicitly 
> manipulate the exported environment, vis:
> (gdb) command-to-set-shell-env VARIABLE VALUE
> (gdb) shell printenv VARIABLE
> VARIABLE=VALUE
> (gdb)
> where VALUE is something that GDB could evaluate.

Why not just use the inferior environment (set env, show env)?  It's
not always appropriate, but usually it would be... and it's much more
natural, I think.

Just a thought.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


      reply	other threads:[~2002-09-09 20:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17  9:50 Jason Kraftcheck
2002-09-09 11:45 ` Andrew Cagney
2002-09-09 13:23   ` Daniel Jacobowitz [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=20020909202306.GA8157@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@ges.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kraftche@cae.wisc.edu \
    /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