public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove dead code from py-finishbreakpoint.c
Date: Tue, 18 Oct 2022 16:33:20 +0000 (GMT)	[thread overview]
Message-ID: <20221018163320.802803858D32@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04ea6b63141c43d9e96999e16917358088556fdd

commit 04ea6b63141c43d9e96999e16917358088556fdd
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jun 5 10:22:40 2022 -0600

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

                 reply	other threads:[~2022-10-18 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221018163320.802803858D32@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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).