aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-06-05 10:22:40 -0600
committerTom Tromey <tromey@adacore.com>2022-10-18 10:31:36 -0600
commit04ea6b63141c43d9e96999e16917358088556fdd (patch)
tree7068f2534d43b2b1416f6173c83aa5b0c0b10b0e /gdb
parentf760c4f2999946dcc4936873a89cf2c24edc5e9b (diff)
downloadgdb-04ea6b63141c43d9e96999e16917358088556fdd.zip
gdb-04ea6b63141c43d9e96999e16917358088556fdd.tar.gz
gdb-04ea6b63141c43d9e96999e16917358088556fdd.tar.bz2
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
Diffstat (limited to 'gdb')
-rw-r--r--gdb/python/py-finishbreakpoint.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index 1d25cca..0255bd1 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)