Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] remove unwanted output in breakpoint_re_set_one
@ 2002-01-14  3:37 Pierre Muller
  2002-01-14  4:43 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2002-01-14  3:37 UTC (permalink / raw)
  To: gdb-patches


The patch below finally removes the 
lot of "Watchpoint XXXX" or "Hardware watchpoint XXX" output that can be seen
both for normal and hardware watchpoints 
at each loadnig of a shared library (or each DLL
in win32 target.

This problem was first reported in my first proposal
about win32 hardware watchpoint support for win32 target,
http://sources.redhat.com/ml/gdb-patches/2001-11/msg00537.html
and caused some confusion, as this was first seen as a
problem with my implementation.
But this was a quite general error present for other targets, like i386 linux,
see my post-scriptum in 
http://sources.redhat.com/ml/gdb-patches/2001-12/msg00030.html

The call to mention at that location in breakpoint_re_set_one 
seems completely unnecessary.

2002-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>

	* breakpoint.c (breakpoint_re_set_one): Remove call to mention
	for watchpoints to avoid unnecessary output 
	when dynamic libraries are loaded.





Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.57
diff -u -p -r1.57 breakpoint.c
--- breakpoint.c        2001/11/11 16:39:59     1.57
+++ breakpoint.c        2002/01/14 11:19:54
@@ -7139,8 +7139,6 @@ breakpoint_re_set_one (PTR bint)
             xfree (b->cond);
           b->cond = parse_exp_1 (&s, (struct block *) 0, 0);
         }
-      if (b->enable_state == bp_enabled)
-       mention (b);
        value_free_to_mark (mark);
        break;
      case bp_catch_catch:



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


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

* Re: [RFA] remove unwanted output in breakpoint_re_set_one
  2002-01-14  3:37 [RFA] remove unwanted output in breakpoint_re_set_one Pierre Muller
@ 2002-01-14  4:43 ` Eli Zaretskii
  2002-01-14 11:11   ` muller
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2002-01-14  4:43 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches


On Mon, 14 Jan 2002, Pierre Muller wrote:

> 2002-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>
> 
> 	* breakpoint.c (breakpoint_re_set_one): Remove call to mention
> 	for watchpoints to avoid unnecessary output 
> 	when dynamic libraries are loaded.

This, of course, begs the question: why was the call to `mention' in 
breakpoint_re_set_one in the first place?  Is this function called only 
when a dynamic library was loaded?  If not, we might be shooting 
ourselves in the foot.  Even if it is only called when a dynamic library 
was loaded, the question why the message was put there still remains.


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

* Re: [RFA] remove unwanted output in breakpoint_re_set_one
  2002-01-14  4:43 ` Eli Zaretskii
@ 2002-01-14 11:11   ` muller
  2002-01-14 23:44     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: muller @ 2002-01-14 11:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: gdb-patches

At 14:42 14/01/02 +0200, Eli Zaretskii wrote:
>
>On Mon, 14 Jan 2002, Pierre Muller wrote:
>
>> 2002-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>
>> 
>> 	* breakpoint.c (breakpoint_re_set_one): Remove call to mention
>> 	for watchpoints to avoid unnecessary output 
>> 	when dynamic libraries are loaded.
>
>This, of course, begs the question: why was the call to `mention' in 
>breakpoint_re_set_one in the first place?  Is this function called only 
>when a dynamic library was loaded?  If not, we might be shooting 
>ourselves in the foot.  Even if it is only called when a dynamic library 
>was loaded, the question why the message was put there still remains.

If you look above in the same function you will see that
mention is called for breakpoints, but only if the breakpoint
address changed.

So it should probably be the same here, but
can a shared lib loading change the watched addresses
needed to watch a given expression? 
I suppose that a correct implementation would 
just call mention if the watched address area are changed,
but I have no idea how that can be done, and I am not
enough interested in this to invest time to try to find out
how that could be accomplished.




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

* Re: [RFA] remove unwanted output in breakpoint_re_set_one
  2002-01-14 11:11   ` muller
@ 2002-01-14 23:44     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2002-01-14 23:44 UTC (permalink / raw)
  To: muller; +Cc: gdb-patches


On Mon, 14 Jan 2002 muller@cerbere.u-strasbg.fr wrote:

> So it should probably be the same here, but
> can a shared lib loading change the watched addresses
> needed to watch a given expression? 

Why not?  For example, if some variable is static in the loaded
library, its address gets fixed-up by the loader, no?

> I suppose that a correct implementation would 
> just call mention if the watched address area are changed,
> but I have no idea how that can be done, and I am not
> enough interested in this to invest time to try to find out
> how that could be accomplished.

Then I think it's wrong to remove the message unconditionally.
Ignoring a superflous message might be annoying, but if you remove the
information altogether, users will have no way of getting it.


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

end of thread, other threads:[~2002-01-15  7:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-14  3:37 [RFA] remove unwanted output in breakpoint_re_set_one Pierre Muller
2002-01-14  4:43 ` Eli Zaretskii
2002-01-14 11:11   ` muller
2002-01-14 23:44     ` Eli Zaretskii

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