This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [obvious] Remove unused argument in insert_bp_location
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Mon, 01 Aug 2011 15:34:07 -0300
- Subject: Re: [obvious] Remove unused argument in insert_bp_location
- References: <1312144543.13977.3.camel@hactar> <m38vrd6vos.fsf@fleche.redhat.com>
On Mon, 2011-08-01 at 08:41 -0600, Tom Tromey wrote:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>
> Thiago> I noticed that disabled_breakpoints is not used. It's both an input and
> Thiago> output parameter. All callers set it to zero, and none of them checks
> Thiago> its value on return.
>
> Thiago> 2011-07-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
> Thiago> * breakpoint.c (insert_bp_location): Remove disabled_breaks
> Thiago> argument. Update callers.
>
> I don't think this patch is really equivalent to the previous code.
>
> To me it seems that *disabled_breaks was being used as a persistent flag.
> That is, the caller doesn't check its value, but subsequent calls to
> insert_bp_location do -- the value is not reset in the ALL_BP_LOCATIONS
> loop in insert_breakpoint_locations.
Oh, you're right. It prevents those warnings from being shown for every
bp_location in a shared library. I'll revert the patch and extend the
documentation of insert_bp_location.
That's one of the problems of hacking on a Sunday. Thanks for checking.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center