This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: reference environment variables from gdb scripts


Hi,

I use .cshrc to update the current pointer
whenever I login to a 32 or 64 bit machine.
If so, I can keep .gdbinit as it is.

BTW, Is there a gdb script functional document?
Is there a gdb script test vector
(or a complete feature checklist)
for each gdb release?

Thanks,
Sheng-Liang

.gdbinit
source ~/.gdb/current/gdb_stl_utils
(ref: http://www.stanford.edu/~afn/gdb_stl_utils/
I try follow the above examples to make some changes for my machine.
I feel it is a little bit hard to debug the scripts.
If you have more gdb script examples, could you email me? Thanks!)

.cshrc
if ( -f ~/.gdb/current ) then
rm ~/.gdb/current
endif
ln -s ~/.gdb/`uname -m`  ~/.gdb/current


/home/ssl/.gdb/i686 /home/ssl/.gdb/x86_64 /home/ssl/.gdb/current -> /home/ssl/.gdb/x86_64


Jan Kratochvil wrote:
On Thu, 23 Aug 2007 23:19:44 +0200, rockwellkc wrote:
Is there a way to reference an environment variable from a gdbscript?

Unaware.


I'm hoping a gdb script command to load different script files based on the
current environment variable.

Set bash function and use the --command parameter?


source $HOME/gdb.scripts

$HOME -> ~ and it should work.


Regards,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]