Re: accessing debugger variables (via script) & customization
Re: accessing debugger variables (via script) & customization
- Subject: Re: accessing debugger variables (via script) & customization
- From: Jens Miltner <email@hidden>
- Date: Fri, 15 Apr 2005 17:29:29 +0200
Am 15.04.2005 um 17:25 schrieb Alastair Houghton:
On 15 Apr 2005, at 13:16, Jens Miltner wrote:
Hi everybody,
does anybody know how to get the following done:
I'd like to provide some contextual menu (or maybe just a script in
the script menu) that would allow me to execute some script
(AppleScript, shell, perl, whatever) that essentially executes some
commands in the debugger console (e.g. call (void)$(val)->Dump() ,
where $(val) would be the variable name).
Can this be done via scripts? I guess AppleScript would be the most
likely candidate to access the selected variable in the debugger's
variable view pane, but I couldn't really find something in the
dictionary that gave me an idea how to tackle the problem - Xcode's
object model just seems to be massive |-:
Any ideas on how to get the currently selected variable (name and/or
value) in the debugger would be welcome.
OTOH, if it's possible to write plugins, that would allow to extend
the debugger functionality, I wouldn't mind writing a bit of code to
do things...
Hi Jens,
I don't know about AppleScript support, but you can write scripts in
GDB itself, which would probably solve your problem. For example
define dump
call $arg0->Dump()
end
then
dump MyVariable
will do the same as
call MyVariable->Dump()
You can put these in a file called .gdbinit in either your home
directory or in the directory you debug from (or both, if you like...
the latter will be executed after the former).
Take a look at the GDB manual section entitled "Canned Sequences of
Commands" for more information.
Yes, I know about this, but it solves my problem only half way: it
still requires me to go the the Debugger console and type the variable
name.
What I'm really striving for is some quick access via a [contextual]
menu that will dump (or whatever) the selected variable in the debugger
window.
So the second part to the problem (and that's the part I couldn't
solve) is how to access the variable selected in the Debugger Window
from a script.
Any ideas about this part?
Thanks,
</jum>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden