0

I'm trying to get chrome's V8 (d8) x64.release version to use the V8 support tools in GDB, specifically for the job and telescope commands (predominantly the former).

My x64.debug version has this implemented and works, but even after building the x64.release version in a similar manner I still cannot get these commands to work in the x64.release version. The output is always as:

gef➤  job 0xd98082f7b51
No symbol "_v8_internal_Print_Object" in current context.

I have set args.gn before, and after building via ninja -C to include v8_enable_object_print = true in my args.gn:

is_debug = false
target_cpu = "x64"
use_goma = false
v8_enable_object_print = true
v8_enable_disassembler = true

I also have my ~/.gdbinit containing:

source ~/Desktop/tools/v8/tools/gdbinit
source ~/Desktop/tools/v8/tools/gdb-v8-support.py 

See: https://chromium.googlesource.com/v8/v8/+/refs/heads/main/tools/gdbinit (for the support tool I'm trying to build V8 with).

How can I get my /v8/out.gn/x64.release/d8 to run with compatibility of the job command?

Am I missing something here? If so your help would be very helpful.

EDIT Alternatively how can I disable all x64.debug V8 DCHECKS?

Thanks all, appreciate your time here.

Sarah M.
  • 167
  • 1
  • 1
  • 12

1 Answers1

1

How can I get my /v8/out.gn/x64.release/d8 to run with compatibility of the job command?

I'm not sure. Try adding symbol_level = 1 (or even symbol_level = 2) to your args.gn. That definitely helps with stack traces, and might also be the thing that lets GDB find the _v8_internal_Print_Object function by name.

Alternatively how can I disable all x64.debug V8 DCHECKS?

There is no flag to disable them, but you can edit the source to make them do nothing. See src/base/logging.h.

jmrk
  • 34,271
  • 7
  • 59
  • 74