From: Sheng-Liang Song <ssl@baymicrosystems.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>,
rockwellkc <koling@kchang.net>,
gdb@sourceware.org
Subject: Re: reference environment variables from gdb scripts
Date: Fri, 24 Aug 2007 16:38:00 -0000 [thread overview]
Message-ID: <46CF0945.8090901@baymicrosystems.com> (raw)
In-Reply-To: <20070824085740.GA11291@host0.dyn.jankratochvil.net>
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
>
next prev parent reply other threads:[~2007-08-24 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-23 21:19 rockwellkc
2007-08-24 8:58 ` Jan Kratochvil
2007-08-24 16:38 ` Sheng-Liang Song [this message]
2007-08-24 17:30 ` Eli Zaretskii
2007-08-24 18:29 ` Sheng-Liang Song
2007-08-25 9:58 ` Eli Zaretskii
2007-08-27 18:30 ` reference environment variables from gdb scripts (gdb and unix pipe) Sheng-Liang Song
2007-08-28 21:03 ` Jim Blandy
2007-08-28 21:08 ` GDB Tool Chains McGuerty, Jay S.
2007-08-28 21:56 ` Peter Toft
2007-08-28 21:59 ` Jim Blandy
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=46CF0945.8090901@baymicrosystems.com \
--to=ssl@baymicrosystems.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=koling@kchang.net \
/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