This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to use shell environment variable in GDB?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Weihua JIANG <weihua dot jiang at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 12 Jun 2007 07:20:30 -0400
- Subject: Re: How to use shell environment variable in GDB?
- References: <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