Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
	        Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: [rfc] Remove dead code in breakpoint.c
Date: Fri, 22 Jun 2007 09:30:00 -0000	[thread overview]
Message-ID: <467B9637.4000409@de.ibm.com> (raw)

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

Hello,

there is no place where DISABLE_UNSETTABLE_BREAK macro is defined. So I guess the code in
breakpoint.c is dead code. But I'm not sure about this- Is there a situation where the removed
code is used? If so please ignore that patch.

ChangeLog:

	* breakpoint.c (insert_bp_location): Remove dead code
	(DISABLE_UNSETTABLE_BREAK).
	(disable_breakpoints_in_shlibs)
	(disable_breakpoints_in_unloaded_shlib): Likewise (comment).

Is this ok ?


-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com


[-- Attachment #2: diff-DISABLE_UNSETTABLE_BREAK --]
[-- Type: text/plain, Size: 1028 bytes --]

diff -urN src/gdb/breakpoint.c dev/gdb/breakpoint.c
--- src/gdb/breakpoint.c	2007-06-13 20:02:38.000000000 +0200
+++ dev/gdb/breakpoint.c	2007-06-22 10:04:16.000000000 +0200
@@ -963,13 +963,7 @@
       if (val)
 	{
 	  /* Can't set the breakpoint.  */
-	  if (
-#if defined (DISABLE_UNSETTABLE_BREAK)
-	      DISABLE_UNSETTABLE_BREAK (bpt->address)
-#else
-	      solib_address (bpt->address)
-#endif
-	      )
+	  if (solib_address (bpt->address))
 	    {
 	      /* See also: disable_breakpoints_in_shlibs. */
 	      val = 0;
@@ -4488,7 +4482,6 @@
   struct breakpoint *b;
   int disabled_shlib_breaks = 0;
 
-  /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK. */
   ALL_BREAKPOINTS (b)
   {
     if (((b->type == bp_breakpoint) || (b->type == bp_hardware_breakpoint))
@@ -4524,7 +4517,6 @@
   struct breakpoint *b;
   int disabled_shlib_breaks = 0;
 
-  /* See also: insert_breakpoints, under DISABLE_UNSETTABLE_BREAK.  */
   ALL_BREAKPOINTS (b)
   {
     if ((b->loc->loc_type == bp_loc_hardware_breakpoint

             reply	other threads:[~2007-06-22  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-22  9:30 Markus Deuling [this message]
2007-07-01 22:35 ` Daniel Jacobowitz
2007-07-02 18:34   ` Ulrich Weigand

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=467B9637.4000409@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=uweigand@de.ibm.com \
    /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