danbev / learning-v8

Project for learning V8 internals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run `job result` or `job *result` error

zhuzhuaicoding opened this issue · comments

Hi,i had run V8_shell startup as you followed. But I cann't print any for this result variable...
What's wrong?

  1711     parse_info.set_language_mode(
   1712         static_cast<LanguageMode>(parse_info.language_mode() | language_mode));
-> 1713     result = CompileToplevel(&info);
(lldb) p result
(v8::internal::Handle<v8::internal::SharedFunctionInfo>) $0 = {
  v8::internal::HandleBase = {
    location_ = 0x0000000000000000
  }
}
(lldb) job result
error: cannot cast from type 'v8::internal::Handle<v8::internal::SharedFunctionInfo>' to pointer type 'void *'
error: 1 errors parsing expression
(lldb) job *result
error: use of undeclared identifier '_v8_internal_Print_Object'
error: 1 errors parsing expression

It might be the case that you have to do a debug build by setting args.gn:

is_debug=true

I'll start a build with this false and try to verify that and update the docs.

@earlymeme I've tried this and with out is_debug=true I get the same failure you reported. I've updated the doc and hopefully made this clear. Thanks for letting me know.