infcmd, btrace: fix crash in 'finish' for tailcall-only frames
authorMarkus Metzger <markus.t.metzger@intel.com>
Tue, 31 May 2016 07:03:15 +0000 (09:03 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 1 Jun 2016 09:14:02 +0000 (11:14 +0200)
commite3b5daf9f735999259c5a8f68b422850c59897e5
tree240a55afba83e89b38678d33373d27d9c8920be0
parent03d73f1fd9d89d89bdd021cad26693e4f6abc07a
infcmd, btrace: fix crash in 'finish' for tailcall-only frames

Patch 7eb895307f53 Skip unwritable frames in command "finish"
skips non-writable frames in addition to tailcall frames.

If skip_tailcall_frames already returns NULL, skip_unwritable_frames
will be called with a NULL frame and crash in get_frame_arch.  This is
caught by gdb.btrace/tailcall-only.exp.

Further, if we ever end up with a mixture of tailcall and non-writable
frames, we may not skip all of them, as intended.

Loop over skip_tailcall_frames and skip_unwritable_frames as long as at least
one of them makes progress.

gdb/
* infcmd.c (skip_finish_frames): New.
(finish_command): Call skip_finish_frames.
gdb/ChangeLog
gdb/infcmd.c
This page took 0.026282 seconds and 4 git commands to generate.