From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Remove dead code from py-finishbreakpoint.c
Date: Sun, 5 Jun 2022 10:29:04 -0600 [thread overview]
Message-ID: <20220605162904.1602810-1-tom@tromey.com> (raw)
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
---
gdb/python/py-finishbreakpoint.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index df54d3643ab..e919899bc81 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_eq (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)
--
2.34.1
next reply other threads:[~2022-06-05 16:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 16:29 Tom Tromey [this message]
2022-10-18 16:29 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220605162904.1602810-1-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).