This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Make ppc-linux-nat insert/remove breakpoint and watchpoint functions return -1.
- From: Tom Tromey <tromey at redhat dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Wed, 06 Jul 2011 08:57:42 -0600
- Subject: Re: [RFA] Make ppc-linux-nat insert/remove breakpoint and watchpoint functions return -1.
- References: <1309897267.3634.6.camel@hactar>
>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
Thiago> target_{insert,remove}_{hw_breakpoint,watchpoint,mask_watchpoint} are
Thiago> supposed to return 0, 1 and -1 for success, unsupported and error,
Thiago> respectively.
I looked around for anything saying this, and couldn't find it.
Well -- I found it for target_insert_mask_watchpoint, but not other
cases.
And, at least in breakpoint.c:insert_bp_location, it seems to me that
the return value is expected to be an errno in one case -- search for
safe_strerror.
Maybe this code is in error? I really couldn't say; but it seems
inconsistent at best. Perhaps only parts of your patch could go in
as-is, what do you think?
Tom