Commit 5e9afd64 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[tools] Fix gdb frame skip over dummy frames

The gdb DCHECK frame skipping automatically skips over all the abort
etc. frames to get you to that DCHECK callsite you're actually looking
for.

However, this is annoying if you tried to call a function with a
breakpoint from the gdb prompt; the frame skipping wold skip over your
breakpoint back up to the failing DCHECK.

Now, we abort the frame walk on dummy frames inserted by gdb execution.

Change-Id: I2cf89ea9219374ad7c562c6eb13afe471038b033
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229376
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77436}
parent c0cf4f83
......@@ -173,6 +173,11 @@ def dcheck_stop_handler(event):
# overflows can be very slow.
while frame is not None and count < 7:
count += 1
# If we are in a frame created by gdb (e.g. for `(gdb) call foo()`), gdb
# emits a dummy frame between its stack and the program's stack. Abort the
# walk if we see this frame.
if frame.type() == gdb.DUMMY_FRAME: break
if frame.name() == 'V8_Dcheck':
frame_message = gdb.lookup_symbol('message', frame.block())[0]
if frame_message:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment