From 84f4c1fe0525fb92c79216087fd8c1744aafb203 Mon Sep 17 00:00:00 2001 From: Phil Muldoon Date: Thu, 11 Nov 2010 14:11:56 +0000 Subject: 2010-11-11 Phil Muldoon * python/py-breakpoint.c (BPPY_REQUIRE_VALID): Check if bp is NULL. (BPPY_SET_REQUIRE_VALID): Ditto. (bpnum_is_valid): Delete function. (bppy_get_visibility): New function. (bppy_new): Parse for, and validate internal keyword. Pass internal keyword to breakpoint or watchpoint functions. (build_bp_list): New function. (gdbpy_breakpoints): Rewrite. Use build_bp_list and iterate_over_breakpoints. (gdbpy_breakpoint_created): Rewrite. Do not store breakpoints in a look-aside vector. (gdbpy_breakpoint_deleted): Rewrite, defer breakpoint management to internal breakpoint chain. * breakpoint.c (set_breakpoint_number): New function. (breakpoint_1): Check if breakpoint number is more than zero. (set_raw_breakpoint_without_location): Set py_bp_object to NULL. (create_breakpoint_sal): Take a new parameter called internal. Call set_breakpoint_number with internal parameter. Do not mention internal breakpoints. All callers updated. (create_breakpoint): Ditto. (create_breakpoints_sal): Ditto. (watch_command_1): Ditto. (watch_command_wrapper): Take a new parameter called internal. All callers updated. (rwatch_command_wrapper): Ditto. (awatch_command_wrapper): Ditto. (save_breakpoints): Update breakpoint save condition check. (iterate_over_breakpoints): New function. * breakpoint.h: Add conditional python includes. Add py_bp_object and comment to struct breakpoint. Update all callers. * defs.h: Add PyObject definition for GDB builds without Python. 2010-11-11 Phil Muldoon * gdb.texinfo (Breakpoints In Python): Document "internal" parameter, and visible attribute. 2010-11-11 Phil Muldoon * gdb.python/py-breakpoint.exp: Add internal watchpoint and breakpoint tests. --- gdb/doc/gdb.texinfo | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'gdb/doc/gdb.texinfo') diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 257ff19..cf70ce4 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -22823,7 +22823,7 @@ Return the symbol table's source absolute file name. Python code can manipulate breakpoints via the @code{gdb.Breakpoint} class. -@defmethod Breakpoint __init__ spec @r{[}type@r{]} @r{[}wp_class@r{]} +@defmethod Breakpoint __init__ spec @r{[}type@r{]} @r{[}wp_class@r{]} @r{[}internal@r{]} Create a new breakpoint. @var{spec} is a string naming the location of the breakpoint, or an expression that defines a watchpoint. The contents can be any location recognized by the @@ -22831,10 +22831,14 @@ watchpoint. The contents can be any location recognized by the command. The optional @var{type} denotes the breakpoint to create from the types defined later in this chapter. This argument can be either: @code{BP_BREAKPOINT} or @code{BP_WATCHPOINT}. @var{type} -defaults to @code{BP_BREAKPOINT}. The optional @var{wp_class} +defaults to @code{BP_BREAKPOINT}. The optional @var{internal} argument +allows the breakpoint to become invisible to the user. The breakpoint +will neither be reported when created, nor will it be listed in the +output from @code{info breakpoints} (but will be listed with the +@code{maint info breakpoints} command). The optional @var{wp_class} argument defines the class of watchpoint to create, if @var{type} is -defined as @code{BP_WATCHPOINT}. If a watchpoint class is not -provided, it is assumed to be a @var{WP_WRITE} class. +@code{BP_WATCHPOINT}. If a watchpoint class is not provided, it is +assumed to be a @var{WP_WRITE} class. @end defmethod The available watchpoint types represented by constants are defined in the @@ -22909,6 +22913,12 @@ determine the actual breakpoint type or use-case. This attribute is not writable. @end defivar +@defivar Breakpoint visible +This attribute tells whether the breakpoint is visible to the user +when set, or when the @samp{info breakpoints} command is run. This +attribute is not writable. +@end defivar + The available types are represented by constants defined in the @code{gdb} module: -- cgit v1.1