Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Weihua JIANG <weihua.jiang@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: How to use shell environment variable in GDB?
Date: Tue, 12 Jun 2007 11:20:00 -0000	[thread overview]
Message-ID: <20070612112030.GB29495@caradoc.them.org> (raw)
In-Reply-To: <266164370706120200v25e88408n7af9ee25a6b7cf24@mail.gmail.com>

On Tue, Jun 12, 2007 at 05:00:02PM +0800, Weihua JIANG wrote:
> E.g. I have a shell environment variable CSR which points to a deep
> directory. Now I hope to load the executable file using below command:
>         file  $CSR/bin/aaa
> But, since GDB can't recognize this environment variable, it can't
> load the executable file.
> 
> How can I use BASH environment variable in GDB?

This is not supported.  You might be able to use this hack:

  shell echo file $CSR/bin/aaa > tmp.scr
  source tmp.scr
  shell rm tmp.scr

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-06-12 11:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-12  9:00 Weihua JIANG
2007-06-12 11:20 ` Daniel Jacobowitz [this message]
2007-06-12 12:50   ` Weihua JIANG
2007-06-12 12:56     ` Daniel Jacobowitz

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=20070612112030.GB29495@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=weihua.jiang@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