This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] Fix inconsistent breakpoint kinds between breakpoints and tracepoints in GDBServer.
- From: Pedro Alves <palves at redhat dot com>
- To: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Thu, 22 Oct 2015 17:11:34 +0100
- Subject: Re: [PATCH v2] Fix inconsistent breakpoint kinds between breakpoints and tracepoints in GDBServer.
- Authentication-results: sourceware.org; auth=none
- References: <5628FE0C dot 5090309 at redhat dot com> <1445529414-11581-1-git-send-email-antoine dot tremblay at ericsson dot com> <5629079A dot 3050809 at redhat dot com> <562908C6 dot 4010903 at ericsson dot com> <56290915 dot 9060608 at redhat dot com> <56290999 dot 9070103 at ericsson dot com>
On 10/22/2015 05:06 PM, Antoine Tremblay wrote:
> On 10/22/2015 12:04 PM, Pedro Alves wrote:
>> (I think you'll need to move the function to target.c to
>> fix !Linux ports, but I'm OK with doing that as a separate step.)
>>
>
> I don't think so since I fix !linux ports like so :
>
> /* Implementation of the target_ops method "breakpoint_kind_from_pc". */
>
> static int
> win32_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
> {
> return the_low_target.breakpoint_len;
> }
>
You don't need this one nor the equivalent in other ports if you
add this to target.h:
#define target_breakpoint_kind_from_pc(PCPTR) \
(the_target->breakpoint_kind_from_pc \
? (*the_target->breakpoint_kind_from_pc) (PCPTR) \
: default_breakpoint_kind_from_pc ())
(see the other similar macros there)
You'll need to adjust callers to call target_breakpoint_kind_from_pc
instead, of course.
Thanks,
Pedro Alves
> /* Implementation of the target_ops method "sw_breakpoint_from_kind". */
>
> static const gdb_byte *
> win32_sw_breakpoint_from_kind (int kind, int *size)
> {
> *size = the_low_target.breakpoint_len;
> return the_low_target.breakpoint;
> }
>
> ?
>