This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for ia32 hardware watchpoint.


"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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]