This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH v2] Fix inconsistent breakpoint kinds between breakpoints and tracepoints in GDBServer.




On 10/22/2015 12:23 PM, Pedro Alves wrote:
On 10/22/2015 05:18 PM, Antoine Tremblay wrote:


On 10/22/2015 12:16 PM, Antoine Tremblay wrote:


On 10/22/2015 12:11 PM, Pedro Alves wrote:

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.



Yes but then I would need a os_arch_sw_breakpoint_from_kind operation in
all the arch that this os supports (and that I can't test), you think
it's still better that way ?


Unless I have another macro that checks for the sw_breakpoint_from_kind
and if abscent returns breakpoint_len... I could do that I guess..

I guess I'm confused.  Why doesn't what you already had, like
below, work as is?

static const gdb_byte *
win32_sw_breakpoint_from_kind (int kind, int *size)
{
    *size = the_low_target.breakpoint_len;
    return the_low_target.breakpoint;
}


Ho yes it would, sorry I was confused I though you meant remove both win32_breakpoint_kind_from_pc and win32_sw_breakpoint_from_kind before.

Removing only win32_breakpoint_kind_from_pc and adding the default macro works.

Thanks,
Antoine


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