This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: A patch for ia32 hardware watchpoint.
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: A patch for ia32 hardware watchpoint.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 10 Mar 2000 02:16:01 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <20000307132613.B20282@valinux.com>
"H . J . Lu" wrote:
> +#ifdef NEED_WATCHPOINT_NUMBER
> + val = target_insert_watchpoint (b->number, addr,
> + len, type);
> +#else
> val = target_insert_watchpoint (addr, len, type);
> +#endif
> +#ifdef NEED_WATCHPOINT_NUMBER
> + val = target_remove_watchpoint (b->number, addr, len,
> + type);
> +#else
> val = target_remove_watchpoint (addr, len, type);
> +#endif
> +#ifdef NEED_WATCHPOINT_NUMBER
> + if (bpt->type == bp_hardware_watchpoint)
> + target_delete_watchpoint (bpt->number);
> +#endif
Just FYI, changes like this are no longer acceptable in generic parts of
GDB (they were once and I spent a good part of a year trying to purge
the worst of them).
Either, test the conditional before the call or (often better) always
make the call and provide a default NOP version of the function.
Andrew