Capture module

exception mcgdb.capture.AlreadyInstalledException(actual)[source]

Bases: Exception

class mcgdb.capture.BreakpointDecoratorFrameFilter[source]

Bases: object

filter(frames)[source]
class mcgdb.capture.FrameStripperDecorator(parent)[source]

Bases: object

address()[source]
filename()[source]
frame_args()[source]
frame_locals()[source]
function()[source]
inferior_frame()[source]
line()[source]
class mcgdb.capture.FunctionBreakpoint(*args, **kws)[source]

Bases: gdb.Breakpoint, mcgdb.representation.Filterable

Breakpoint set at the entry and return point of function spec. Subclasses should extend methods FunctionBreakpoint.prepare_before and FunctionBreakpoint.prepare_after to capture relevant information (parameters) from the function calls.

Parameters:

spec -- location at wich the breakpoint should be set.

Variables:
  • func_type -- a member of FunctionTypes indicating the nature of the breakpoint. This type will be used to enable/disable some families of breakpoints.
  • hit_internal -- number of breakpoint hits.
  • fhit_internal -- number of hits of the finish breakpoint.
breakpointed = {}
static check_breakpoint_validity(_=None)[source]
decorator

alias of FrameStripperDecorator

func_type = <function type: General>
hit_count = 0
list_ = []
prepare_after(data)[source]

Virtual method. Function executed when the function targeted by this FunctionBreakpoint finishes.

Parameters:data -- the object returned in position #3a by FunctionBreakpoint.prepare_before.
Returns:True if GDB should stop the execution.
prepare_before()[source]

Virtual method. Function executed with the FunctionBreakpoint hits its target function. By convention, return #3 contains a dictionnay will all the information captured at the breakpoint stop. The items of the dictionnary will be transmitted to the data logger for offline trace generation.

Returns:None if this was a spurious stop. The execution won't be stop, nor the user notified.
Returns:#1 True if the execution should be stopped now.
Returns:#2 True if the finish breakpoint should be inserted.
Returns:#3 Any object to transmit to FunctionBreakpoint.prepare_after.
run_early()[source]
stop()[source]
class mcgdb.capture.FunctionFinishBreakpoint(parent, fct_data, filter_params)[source]

Bases: gdb.Breakpoint

hit_count = 0
out_of_scope()[source]
stop()[source]
class mcgdb.capture.FunctionType(name, parent=None)[source]

Bases: object

root = <function type: General>
to_enabled(status)[source]
class mcgdb.capture.FunctionTypes[source]

Bases: object

comm_func = <function type: Communication>
conf_func = <function type: Configuration>
define_func = <function type: Definition>
exec_func = <function type: Execution>
general_func = <function type: General>
info_func = <function type: Information>
class mcgdb.capture.NoPCFrame(parent)[source]

Bases: mcgdb.capture.FrameStripperDecorator

address()[source]
filename()[source]
frame_args()[source]
frame_locals()[source]
function()[source]
line()[source]
class mcgdb.capture.NoPCFrameFilter[source]

Bases: object

filter(frames)[source]
mcgdb.capture.frame_depth(frame)[source]
mcgdb.capture.initialize()[source]