try "info locals" to see all variables that gdb knows about in the current
context.

This is, however, not v8 specific, I'd recommend reading a tutorial about
gdb or use a graphical frontend such as ddd

On Wed, Mar 9, 2016 at 9:50 AM <[email protected]> wrote:

> Hi, thanks for the answer, but I of course check bt:
>
> It is:
> #0  v8::internal::FullCodeGenerator::Generate() () at
> ../src/full-codegen/x64/full-codegen-x64.cc:94
> #1  0x00000000010240de in
> v8::internal::FullCodeGenerator::MakeCode(v8::internal::CompilationInfo*)
> () at ../src/full-codegen/full-codegen.cc:49
> #2  0x0000000000e8f9dc in
> v8::internal::GenerateBaselineCode(v8::internal::CompilationInfo*) () at
> ../src/compiler.cc:782
> #3  0x0000000000e99026 in
> v8::internal::CompileBaselineCode(v8::internal::CompilationInfo*) () at
> ../src/compiler.cc:796
> #4  0x0000000000e8da38 in
> v8::internal::CompileToplevel(v8::internal::CompilationInfo*) () at
> ../src/compiler.cc:1281
> #5  0x0000000000e8e962 in
> v8::internal::Compiler::CompileScript(v8::internal::Handle<v8::internal::String>,
> v8::internal::Handle<v8::internal::Object>, int, int,
> v8::ScriptOriginOptions, v8::internal::Handle<v8::internal::Object>,
> v8::internal::Handle<v8::internal::Context>, v8::Extension*,
> v8::internal::ScriptData**, v8::ScriptCompiler::CompileOptions,
> v8::internal::NativesFlag, bool) () at ../src/compiler.cc:1510
> #6  0x0000000000cf590f in
> v8::internal::Bootstrapper::CompileNative(v8::internal::Isolate*,
> v8::internal::Vector<char const>,
> v8::internal::Handle<v8::internal::String>, int,
> v8::internal::Handle<v8::internal::Object>*, v8::internal::NativesFlag) ()
> at ../src/bootstrapper.cc:1889
> #7  0x0000000000cf5c53 in
> v8::internal::Bootstrapper::CompileExperimentalBuiltin(v8::internal::Isolate*,
> int) () at ../src/bootstrapper.cc:1838
> #8  0x0000000000d00ec0 in
> v8::internal::Genesis::InstallExperimentalNatives() () at
> ../src/bootstrapper.cc:2988
> #9  0x0000000000d04094 in
> v8::internal::Genesis::Genesis(v8::internal::Isolate*,
> v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>,
> v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*,
> v8::internal::GlobalContextType) () at ../src/bootstrapper.cc:3589
> #10 0x0000000000ce7684 in
> v8::internal::Bootstrapper::CreateEnvironment(v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>,
> v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*,
> v8::internal::GlobalContextType) () at ../src/bootstrapper.cc:327
> #11 0x0000000000c878af in v8::CreateEnvironment(v8::internal::Isolate*,
> v8::ExtensionConfiguration*, v8::Local<v8::ObjectTemplate>,
> v8::Local<v8::Value>)
>     () at ../src/api.cc:5490
> #12 0x0000000000c60bfc in v8::Context::New(v8::Isolate*,
> v8::ExtensionConfiguration*, v8::Local<v8::ObjectTemplate>,
> v8::Local<v8::Value>) ()
>     at ../src/api.cc:5518
> #13 0x0000000000c313db in v8::Shell::CreateEvaluationContext(v8::Isolate*)
> () at ../src/d8.cc:1268
> #14 0x0000000000c355ad in v8::Shell::RunMain(v8::Isolate*, int, char**,
> bool) () at ../src/d8.cc:2042
> #15 0x0000000000c36801 in v8::Shell::Main(int, char**) () at
> ../src/d8.cc:2521
> #16 0x0000000000c3d092 in main () at ../src/d8.cc:2562
>
> after I've typed first 's', then I've typed 'print info' and received
> 'No symbol "info" in current context' :(
>
> Does gdb work for anyone? Google guys, where are you?
>
> On Friday, March 4, 2016 at 5:42:12 AM UTC+6, [email protected] wrote:
>>
>> Hi.
>>
>> I think you couldn't see local variables of 'FullCodeGenerator::Generate'
>> since you are in different function context.
>>
>> You set break point at 'FullCodeGenerator::Generate' and then proceeded
>> program with 's' command.
>> This results in function call and you might be at
>> ''FullCodeGenrator::isolate' which doesn't have "info" as local variable.
>>
>> Have you ever checked backtrace?
>> When I followed your instruction, I get following backtrace.
>>
>> #0  v8::internal::FullCodeGenerator::isolate (this=0x7fffffffbe28) at
>> .././src/full-codegen/full-codegen.h:703
>> #1  0x00000000014756e7 in v8::internal::FullCodeGenerator::Generate
>> (this=0x7fffffffbe28) at ../src/full-codegen/x64/full-codegen-x64.cc:94
>> #2  0x0000000001078096 in v8::internal::FullCodeGenerator::MakeCode
>> (info=0x7fffffffc478) at ../src/full-codegen/full-codegen.cc:51
>> #3  0x0000000000ecc9cc in v8::internal::GenerateBaselineCode
>> (info=0x7fffffffc478) at ../src/compiler.cc:790
>> #4  0x0000000000ed5636 in v8::internal::CompileBaselineCode
>> (info=0x7fffffffc478) at ../src/compiler.cc:804
>>
>> Thanks.
>>
>> 2016년 3월 3일 목요일 오후 5시 40분 21초 UTC+9, [email protected] 님의 말:
>>>
>>> Hi guys.
>>>
>>> I compile v8 with next command:
>>> $ x64.debug debugsymbols=on disassembler=on gdbjit=on console=readline
>>>
>>> then I want to setup a breakpoint on v8::internal::FullCodeGenerator::
>>> Generate() in gdb
>>> I do next steps
>>> $ gdb ./out/x64.debug/d8
>>> $ break v8::internal::FullCodeGenerator::Generate()
>>>
>>> and everythink is ok, and then I run d8 with some small js script
>>>
>>> $ r ../test.js
>>>
>>> and I stop on this line
>>>
>>> CompilationInfo* info = info_;
>>>
>>> $ s
>>> $ s
>>>
>>> And here I want to see what is value of local variable info
>>> I'm typing
>>>
>>> $ p info
>>>
>>> And I'm receiving:
>>>
>>> No symbol "info" in current context.
>>>
>>> It's my mistake or somebody has the same issues?
>>>
>>> It looks like v8 build system calls strip on final executable...
>>>
>> --
> --
> 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.
>

-- 
-- 
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