How to use exported shell varible in gdb

Tom Tromey tromey@redhat.com
Tue Jun 8 21:04:00 GMT 2010


>>>>> "robert" == robert song <robertsong.japan@gmail.com> writes:

Sorry for the delay in replying to this.

robert> I exported one variable in  $HOME/.bashrc.
robert> export mygit="$HOME/git"

robert> But I can't use in gdb.
robert> (gdb) cd $mygit
robert> $mygit: No such file or directory.

robert> Is it possible to use it in gdb ?

Not without some difficulty.

You could probably do it by writing some kind of "eval" command in Python.
"eval" itself was discussed on the patches list for a while; I don't
remember what happened to it.

Tom



More information about the Gdb mailing list