* How to use shell environment variable in GDB?
@ 2007-06-12 9:00 Weihua JIANG
2007-06-12 11:20 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Weihua JIANG @ 2007-06-12 9:00 UTC (permalink / raw)
To: gdb
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?
Thanks
Weihua
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: How to use shell environment variable in GDB?
2007-06-12 9:00 How to use shell environment variable in GDB? Weihua JIANG
@ 2007-06-12 11:20 ` Daniel Jacobowitz
2007-06-12 12:50 ` Weihua JIANG
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-06-12 11:20 UTC (permalink / raw)
To: Weihua JIANG; +Cc: gdb
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to use shell environment variable in GDB?
2007-06-12 11:20 ` Daniel Jacobowitz
@ 2007-06-12 12:50 ` Weihua JIANG
2007-06-12 12:56 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Weihua JIANG @ 2007-06-12 12:50 UTC (permalink / raw)
To: Weihua JIANG, gdb
Does gdb support custom command? If so, I can define the 3 commands
you mentioned as one custom command.
Thanks
Weihua
2007/6/12, Daniel Jacobowitz <drow@false.org>:
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-12 12:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-12 9:00 How to use shell environment variable in GDB? Weihua JIANG
2007-06-12 11:20 ` Daniel Jacobowitz
2007-06-12 12:50 ` Weihua JIANG
2007-06-12 12:56 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox