From: Tom Tromey Date: Sun, 5 Jun 2022 16:22:40 +0000 (-0600) Subject: Remove dead code from py-finishbreakpoint.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04ea6b63141c43d9e96999e16917358088556fdd;p=binutils-gdb.git Remove dead code from py-finishbreakpoint.c PR python/16324 points out that comparing a frame id to null_frame_id can never succeed, and proposes simply removing the dead code. That is what this patch does. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324 --- diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index 1d25cca5c17..0255bd1fead 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -205,12 +205,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs) "be set on a dummy frame.")); } else - { - frame_id = get_frame_id (prev_frame); - if (frame_id == null_frame_id) - PyErr_SetString (PyExc_ValueError, - _("Invalid ID for the `frame' object.")); - } + frame_id = get_frame_id (prev_frame); } } catch (const gdb_exception &except)