snare / voltron

A hacky debugger UI for hackers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On OS X View Not Showing

sloik opened this issue · comments

No views are displayed on lldb debug session.

 ~/L/D/X/D/C/B/P/Debug  lldb CodeExamples
Voltron loaded.
(lldb) target create "CodeExamples"
Current executable set to 'CodeExamples' (x86_64).
(lldb) voltron init
Registered stop-hook
(lldb) b main
Breakpoint 1: where = CodeExamples`main + 48 at P01.cpp:12, address = 0x0000000100000e70
(lldb) r
Process 5203 launched: '/Users/.../Xcode/DerivedData/CodeExamples-gpefcssqiyqbenezjwtriakydarn/Build/Products/Debug/CodeExamples' (x86_64)
Process 5203 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000100000e70 CodeExamples`main(argc=1, argv=0x00007ffeefbff840) at P01.cpp:12
   9
   10  	int main(int argc, const char * argv[]) {
   11
-> 12  	    std::cout << "getpid -> " << ::getpid() << " (parent -> " << ::getppid() << ")" << std::endl << std::endl;

Target 0: (CodeExamples) stopped.
(lldb) voltron v r
Usage: voltron <init|debug|update>
(lldb)

I'm an idiot closing ;)

commented

@sloik have you find the solution? i also meet this problem. No view displayed and output: "Usage: voltron <init|debug|update>"

commented

I figured it out. Would have been great if you could have given some followup @sloik :)

The problem is that me (and probably @lday0321 as well) assumed that this script runs inside the debugger only, this is not correct.

Voltron inside the debugger only registers the stephook, then exposes that from outside which isn't clear from the README (although it mentioned it, I also missed this step. The screenshot made it look like it's all running in the same thing)

So inside the debugger you do voltron init, then OUTSIDE the debugger from a different shell you do voltron show reg to open a view, which then synchronises with the session inside the debugger.

I think I was running that init in Xcode and did not connect in other sessions. :)