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]

[PATCH 2/2] Global breakpoints, GDBserver


The GDBserver part of global breakpoints is similar to GDB's linux-nat.c code, although I'm not sure we have enough infrastructure yet to be able to share the code.

We also need a hook for GDB disconnection, so that GDBserver can close the breakpoint device, which in turn triggers the clearing of traps and other any paraphernalia associated with the ended GDB session; the breakpoint device needs to be careful that it only maintain global breakpoints as long as there is a GDB to notify of hits.

(Also I didn't mention it in the introduction, but I'm not wild about "global breakpoint" as a term for all this, not least because there is a "global breakpoint" property in gdbarch, which is sort-of related, but an entirely different code path. "Multi-process breakpoint" is an awkward mouthful but perhaps more accurate.)

Stan
stan@codesourcery.com

2011-06-13 Stan Shebs <stan@codesourcery.com>

    * target.h (target_ops): Add define_global_breakpoint,
    insert_global_breakpoint, delete_global_breakpoint,
    host_disconnected.
    * server.c (handle_general_set): Add handling for QGBreak* packets.
    (handle_query): Report that global breakpoints are supported.
    (main): Call host_disconnected hook.
    * linux-low.c (BREAKPOINT_DEVICE): New macro.
    (MAX_GB_PACKET): New macro.
    (gbfd): New global.
    (gbcount): New global.
    (open_gb_device): New function.
    (close_gb_device): New function.
    (tohex): New function.
    (linux_handle_breakpoint_hit): New function.
    (linux_record_breakpoint): New function.
    (get_gb_reply): New function.
    (linux_define_global_breakpoint): New function.
    (linux_insert_global_breakpoint): New function.
    (linux_delete_global_breakpoint): New function.
    (linux_target_op): Add them, plus set host_disconnected.
    (gb_event_handler): New function.


Attachment: gb-patch-2
Description: Text document


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