Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [commit] (was: "Re: Two identical "else if" blocks ?")
Date: Mon, 01 Jan 2007 14:12:00 -0000	[thread overview]
Message-ID: <20070101141314.GB17211@adacore.com> (raw)
In-Reply-To: <20070101040118.GA2035@nevyn.them.org>

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

> > It looks like the two blocks are completely identical, and we should
> > be able to remove one of them. Should I perhaps test what happens
> > when I delete, say, the first one?
> 
> They're not 100% the same (there's an extra b->inserted check) so I'd
> recommend deleting the second one, since it's dead code.

Argh! I knew I had a blind spot :-/.

I've checked the following change in after having tested in on x86-linux.

2006-01-01  Joel Brobecker  <brobecker@adacore.com>

       * breakpoint.c (remove_breakpoint): Remove dead code.

-- 
Joel

[-- Attachment #2: dead.diff --]
[-- Type: text/plain, Size: 753 bytes --]

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.234
diff -u -p -r1.234 breakpoint.c
--- breakpoint.c	18 Dec 2006 22:10:13 -0000	1.234
+++ breakpoint.c	1 Jan 2007 06:05:33 -0000
@@ -1637,17 +1637,6 @@ remove_breakpoint (struct bp_location *b
 	return val;
       b->inserted = (is == mark_inserted);
     }
-  else if (ep_is_exception_catchpoint (b->owner)
-	   && b->inserted	/* sometimes previous insert doesn't happen */
-	   && breakpoint_enabled (b->owner)
-	   && !b->duplicate)
-    {
-      val = target_remove_breakpoint (&b->target_info);
-      if (val)
-	return val;
-
-      b->inserted = (is == mark_inserted);
-    }
 
   return 0;
 }

      reply	other threads:[~2007-01-01 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-01  3:52 Two identical "else if" blocks ? Joel Brobecker
2007-01-01  4:01 ` Daniel Jacobowitz
2007-01-01 14:12   ` Joel Brobecker [this message]

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=20070101141314.GB17211@adacore.com \
    --to=brobecker@adacore.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