Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfc] Remove dead code in breakpoint.c
@ 2007-06-22  9:30 Markus Deuling
  2007-07-01 22:35 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Deuling @ 2007-06-22  9:30 UTC (permalink / raw)
  To: GDB Patches; +Cc: Ulrich Weigand, Mark Kettenis

[-- 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

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

* Re: [rfc] Remove dead code in breakpoint.c
  2007-06-22  9:30 [rfc] Remove dead code in breakpoint.c Markus Deuling
@ 2007-07-01 22:35 ` Daniel Jacobowitz
  2007-07-02 18:34   ` Ulrich Weigand
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-07-01 22:35 UTC (permalink / raw)
  To: Markus Deuling; +Cc: GDB Patches, Ulrich Weigand, Mark Kettenis

On Fri, Jun 22, 2007 at 11:28:23AM +0200, Markus Deuling wrote:
> 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 ?

Yes, this is OK.  Thanks.


-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: [rfc] Remove dead code in breakpoint.c
  2007-07-01 22:35 ` Daniel Jacobowitz
@ 2007-07-02 18:34   ` Ulrich Weigand
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrich Weigand @ 2007-07-02 18:34 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Markus Deuling, GDB Patches, Mark Kettenis

Daniel Jacobowitz wrote:
> On Fri, Jun 22, 2007 at 11:28:23AM +0200, Markus Deuling wrote:
> > 	* 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 ?
> 
> Yes, this is OK.  Thanks.

I've checked this in now, thanks.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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

end of thread, other threads:[~2007-07-02 18:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-22  9:30 [rfc] Remove dead code in breakpoint.c Markus Deuling
2007-07-01 22:35 ` Daniel Jacobowitz
2007-07-02 18:34   ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox