I'm developing some features for llnode, a LLDB plugin that allows better 
postmortem debugging for NodeJS, and while developing one of those features 
I needed to access a Context object from an Isolate object, which is very 
easy using V8 API, Unfortunately it's not possible to call any functions or 
methods inside LLDB when analyzing a core dump file, so the only way I 
found to access the Context object was by accessing 
Isolate::thread_local_top_, and then doing the same to access 
ThreadLocalTop::context_. To do so, I needed to change 
gen-postmortem-metadata.py and add the following symbols that represents 
the offsets of both attributes:

consts_misc = [
  # ...
    { 'name': 'IsolateThreadLocalTop',       'value': '(size_t) 
(((v8::internal::Isolate*)0)->thread_local_top())' },
    { 'name': 'ThreadLocalTopContext',       'value': '(size_t) 
&(((v8::internal::ThreadLocalTop*)0)->context_)' },
];

Is there an easier way to access the Context object from an Isolate object? 
If not, those changes I made are acceptable for submission?

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to