• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: accessing debugger variables (via script) & customization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessing debugger variables (via script) & customization


  • Subject: Re: accessing debugger variables (via script) & customization
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 15 Apr 2005 16:25:05 +0100

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.

(You should be able to invoke AppleScript from GDB, BTW, by running osascript using the "shell" command; if you need to integrate with an existing program using AppleScript, this might help.)

Kind regards,

Alastair.

--
http://www.alastairs-place.net

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: accessing debugger variables (via script) & customization
      • From: Jens Miltner <email@hidden>
References: 
 >accessing debugger variables (via script) & customization (From: Jens Miltner <email@hidden>)

  • Prev by Date: distcc (left over) temporary files eating massive amount of disk space
  • Next by Date: Re: accessing debugger variables (via script) & customization
  • Previous by thread: accessing debugger variables (via script) & customization
  • Next by thread: Re: accessing debugger variables (via script) & customization
  • Index(es):
    • Date
    • Thread