This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Processing of convenience variables for scripts ...
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Richard Sharpe <rsharpe at ns dot aus dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 20 Nov 2002 09:13:11 -0500
- Subject: Re: Processing of convenience variables for scripts ...
- References: <Pine.LNX.4.33.0211201939430.6081-100000@ns.aus.com>
On Wed, Nov 20, 2002 at 07:42:04PM +1030, Richard Sharpe wrote:
> Hi,
>
> The following script does not seem to work:
>
> define load-ko-syms
> path ./freebsd_46_i386/debug/export/kernel
> set $file = linker_files.tqh_first
> set $file = $file->link.tqe_next
> if ($file == 0)
> printf "No klds to load symbols for\n"
> else
> while ($file != 0)
> add-symbol-file $file->filename ($file->address +
> $file->text_offs)
> printf "Loaded symbols for %s\n", $file->filename
> set $file = $file->link.tqe_next
> end
> end
> end
>
> The loop works, but add-symbol-file seems to be called without the
> convenience variables being expanded.
>
> Have it got that right?
>
> If so, what would be the first step to get them expanded?
add-symbol-file takes constants, not expressions - so variables are not
expanded. This should probably change but it's not clear how, given
the parser...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer