[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting gdb init work on emacs
From: |
Nick Roberts |
Subject: |
Re: getting gdb init work on emacs |
Date: |
Thu, 3 Apr 2008 15:01:11 +1200 |
> define lwlan
> set $kld = linker_files.tqh_first
> while ($kld != 0)
> if [$kld->filename=="wlan.ko"] \
> printf "0x%08x %s\n", $kld->address, $kld->filename
> end
> set $kld = $kld->link.tqe_next
> end
> end
>
> running it gives me this :
>
> (kgdb) lwlan
> A syntax error in expression, near `[$kld->filename=="wlan.ko"] printf
> "0x%08x %s\n", $kld->address, $kld->filename'.
>
> by the way does it follow the shell syntax or
No. Which is why square brackets don't work.
> is there any other syntax ?
See the Sequences node of the Gdb manual. The syntax is quite restricted and
expressions like $kld->filename won't work.
There is currently work being done on Python scripting. This is being reported
on the gdb mailing list (gdb@sourceware.org) which is where this question should
really go as it's about Gdb.
--
Nick http://www.inet.net.nz/~nickrob