Commit 3ef8ae90 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[gdb] Limit stack search when looking for DCHECK

Only look 5 frames up the stack when looking for a DCHECK to move the
frame to to prevent excessive iteration especially after a stack
overflow.

Change-Id: I227c46596f09c9af0a47e6673d3165eaccb75163
Reviewed-on: https://chromium-review.googlesource.com/c/1400408Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58621}
parent f49efaef
......@@ -140,7 +140,11 @@ def dcheck_stop_handler(event):
frame = gdb.selected_frame()
select_frame = None
message = None
while frame is not None:
count = 0
# limit stack scanning since they're usually shallow and otherwise stack
# overflows can be very slow.
while frame is not None and count < 5:
count += 1
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