public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove dead code from py-finishbreakpoint.c
@ 2022-06-05 16:29 Tom Tromey
  2022-10-18 16:29 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2022-06-05 16:29 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove dead code from py-finishbreakpoint.c
  2022-06-05 16:29 [PATCH] Remove dead code from py-finishbreakpoint.c Tom Tromey
@ 2022-10-18 16:29 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2022-10-18 16:29 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> PR python/16324 points out that comparing a frame id to null_frame_id
Tom> can never succeed, and proposes simply removing the dead code.  That
Tom> is what this patch does.

Tom> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16324

I forgot about this patch, but stumbled across the bug today.  I've
rebased it and fixed it up, and now I'm checking it in.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-18 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 16:29 [PATCH] Remove dead code from py-finishbreakpoint.c Tom Tromey
2022-10-18 16:29 ` Tom Tromey

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).