The tools/gdbinit file contains a couple of gdb macros that are useful
here. In particular, 'jst' will print the current JS stack trace.
But this will only give you JS frames. If you want to dive even deeper, you
can print the code objects currently on the stack with 'jco'.
Note that on x64, you might need to jump through a few hoops to get the
correct stack. You can do a manual stack walk as follows:
x/32gx $rbp
stored base ptr return address
v v
0x7fffffffcf48: 0x00007fffffffcf98 0x000009a8bf685a48
0x7fffffffcf58: 0x0000391473a88279 0x00002c2b59aabc91
0x7fffffffcf68: 0x00002c2b59a8cfb9 0x00002c2b59aabc91
0x7fffffffcf78: 0x0000391473a88279 0x0000391473a82311
0x7fffffffcf88: 0x00002c2b59a96ad1 0x00002c2b59a96859
0x7fffffffcf98: 0x00007fffffffcfd0 0x000009a8bf5063f5 <- next frame
0x7fffffffcfa8: 0x0000391473a82311 0x0000391473a88279
0x7fffffffcfb8: 0x0000000000000000 0x00002c2b59a96ad1
0x7fffffffcfc8: 0x0000000e00000000 0x00007fffffffd018
0x7fffffffcfd8: 0x000009a8bf685635 0x0000391473a88279
0x7fffffffcfe8: 0x00002c2b59a96ad1 0x0000000000000000
0x7fffffffcff8: 0x00002c2b59aa9f49 0x0000391473a82311
0x7fffffffd008: 0x00002c2b59aaa319 0x00002c2b59a83bf9
0x7fffffffd018: 0x00007fffffffd048 0x000009a8bf5cdba3
0x7fffffffd028: 0x00002c2b59aabcc9 0x00002c2b59aaa319
0x7fffffffd038: 0x000009a8bf5cda81 0x0000000c00000000
jco 0x000009a8bf685a48 // Prints the code object of the top-most frame.
On Mon, Jul 31, 2017 at 10:59 AM, Patrick Spiegel <
[email protected]> wrote:
> When debugging D8 with GDB (gdbjit enabled) major parts of the backtrace
> are still marked with ??.
>
> #0 0x0000000001eab2ef in StringMark::StringMark (this=0x7fffffffdc48,
> other=...) at ../src/mark.cc:214
> #1 0x0000000001e80799 in v8::internal::__RT_impl_Runtime_StringIsMarked
> (args=..., isolate=0x27b5530) at ../src/runtime/runtime-strings.cc:107
> #2 0x0000000001e80514 in v8::internal::Runtime_StringIsMarked
> (args_length=1, args_object=0x7fffffffdd28, isolate=0x27b5530) at
> ../src/runtime/runtime-strings.cc:102
> #3 0x00003b15c7e84204 in ?? ()
> #4 0x00003b15c7e84141 in ?? ()
> #5 0x00007fffffffdd00 in ?? ()
> #6 0x0000000000000006 in ?? ()
> #7 0x00007fffffffdd40 in ?? ()
> ...
>
> The statement executed via D8 is
> String.fromCharCode(100).isMarked()
>
> I know that V8 crashes because of accessing an uninitialized pointer in
> the isMarked() call, but what I would like to know is what happens all the
> way before on the fromCharCode(100) call.
>
> Any tips on how to debug this properly?
>
> Thanks & best regards,
> Patrick
>
> --
> --
> 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.