Foundry.Debugger

g Foundry.Contextual Foundry.Contextual Foundry.Debugger Foundry.Debugger Foundry.Contextual->Foundry.Debugger GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

Foundry.DapDebugger

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

can_move (movement)

connect_to_target (target)

disassemble (begin_address, end_address)

dup_name ()

dup_primary_thread ()

emit_event (event)

has_terminated ()

initialize ()

interpret (command)

interrupt ()

list_address_space ()

list_log_messages ()

list_modules ()

list_thread_groups ()

list_threads ()

list_traps ()

move (movement)

send_signal (signum)

stop ()

trap (params)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

do_can_move (movement)

do_connect_to_target (target)

do_disassemble (begin_address, end_address)

do_dup_name ()

do_dup_primary_thread ()

do_event (event)

do_has_terminated ()

do_initialize ()

do_interpret (command)

do_interrupt ()

do_list_address_space ()

do_list_log_messages ()

do_list_modules ()

do_list_thread_groups ()

do_list_threads ()

do_list_traps ()

do_move (movement)

do_send_signal (signum)

do_stop ()

do_trap (params)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

address-space

Gio.ListModel

r

log-messages

Gio.ListModel

r

modules

Gio.ListModel

r

primary-thread

Foundry.DebuggerThread

r

terminated

bool

r

threads

Gio.ListModel

r

traps

Gio.ListModel

r

Signals

Inherited:

GObject.Object (1)

Name

Short Description

event

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Foundry.Contextual

r

Class Details

class Foundry.Debugger(**kwargs)
Bases:

Foundry.Contextual

Abstract:

Yes

Structure:

Foundry.DebuggerClass

Abstract base class for debugger implementations.

Foundry.Debugger provides the core interface for debugging operations including breakpoint management, variable inspection, and execution control. Concrete implementations handle specific debugging protocols and backends while maintaining a consistent API.

can_move(movement)
Parameters:

movement (Foundry.DebuggerMovement) –

Returns:

True if movement can be performed

Return type:

bool

Determines of the debugger can currently make movement.

Use [method`Foundry`.DebuggerThread.can_move] in new code.

Deprecated since version 1.1.

connect_to_target(target)
Parameters:

target (Foundry.DebuggerTarget) – a [class`Foundry`.DebuggerTarget]

Returns:

[class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Connects to target.

Not all debuggers may not support all debugger target types.

disassemble(begin_address, end_address)
Parameters:
  • begin_address (int) –

  • end_address (int) –

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerInstruction].

Return type:

Dex.Future

Disassemble the instructions found in the address range.

dup_name()
Returns:

the name of the provider

Return type:

str

Gets a name for the provider that is expected to be displayed to users such as “GNU Debugger”.

dup_primary_thread()
Returns:

a [class`Foundry`.DebuggerThread] or None

Return type:

Foundry.DebuggerThread or None

Gets a copy of the primary thread (the first thread created by the debugger).

New in version 1.1.

emit_event(event)
Parameters:

event (Foundry.DebuggerEvent) –

This should only be used by debugger implementations.

has_terminated()
Return type:

bool

initialize()
Returns:

[class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This must be called before using the debugger instance and may only be called once.

Subclasses are expected to perform capability negotiation as part of this request.

interpret(command)
Parameters:

command (str) – the command to interpret

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Requests that the debugger interpret a command. This is typically the REPL of a debugger and can be used to bridge the normal interpreter of a debugger to the the user.

interrupt()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This should cause the child process to pause.

Use [method`Foundry`.DebuggerThread.interrupt] in new code.

Deprecated since version 1.1.

list_address_space()
Return type:

Gio.ListModel

Gets a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerMappedRegion] that is updated based on the address mapping of the debuggee.

list_log_messages()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerLogMessage].

Return type:

Gio.ListModel

Lists available log messages from the debugger instance.

New in version 1.1.

list_modules()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerTrap]

Return type:

Gio.ListModel

Lists the known modules loaded into the address space.

list_thread_groups()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerThreadGroup]

Return type:

Gio.ListModel

List thread groups known to the debugger.

list_threads()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerThread]

Return type:

Gio.ListModel

List threads known to the debugger.

list_traps()
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerTrap]

Return type:

Gio.ListModel

List known traps (breakpoints, countpoints, watchpoints) that have been registered with the debugger.

move(movement)
Parameters:

movement (Foundry.DebuggerMovement) – how to move within the debugger

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Use [method`Foundry`.DebuggerThread.move] in new code.

Deprecated since version 1.1.

send_signal(signum)
Parameters:

signum (int) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Send signal signum to debuggee.

stop()
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Stop the debugger fully. This should at least cause the inferior to be sent a terminating signal.

trap(params)
Parameters:

params (Foundry.DebuggerTrapParams) – the params for creating the new trap

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Register a new breakpoint based on params.

do_can_move(movement) virtual
Parameters:

movement (Foundry.DebuggerMovement) –

Returns:

True if movement can be performed

Return type:

bool

Determines of the debugger can currently make movement.

Use [method`Foundry`.DebuggerThread.can_move] in new code.

Deprecated since version 1.1.

do_connect_to_target(target) virtual
Parameters:

target (Foundry.DebuggerTarget) – a [class`Foundry`.DebuggerTarget]

Returns:

[class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Connects to target.

Not all debuggers may not support all debugger target types.

do_disassemble(begin_address, end_address) virtual
Parameters:
  • begin_address (int) –

  • end_address (int) –

Returns:

a [class`Dex`.Future] that resolves to a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerInstruction].

Return type:

Dex.Future

Disassemble the instructions found in the address range.

do_dup_name() virtual
Returns:

the name of the provider

Return type:

str

Gets a name for the provider that is expected to be displayed to users such as “GNU Debugger”.

do_dup_primary_thread() virtual
Returns:

a [class`Foundry`.DebuggerThread] or None

Return type:

Foundry.DebuggerThread or None

Gets a copy of the primary thread (the first thread created by the debugger).

New in version 1.1.

do_event(event) virtual
Parameters:

event (Foundry.DebuggerEvent) –

do_has_terminated() virtual
Return type:

bool

do_initialize() virtual
Returns:

[class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This must be called before using the debugger instance and may only be called once.

Subclasses are expected to perform capability negotiation as part of this request.

do_interpret(command) virtual
Parameters:

command (str) – the command to interpret

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Requests that the debugger interpret a command. This is typically the REPL of a debugger and can be used to bridge the normal interpreter of a debugger to the the user.

do_interrupt() virtual
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

This should cause the child process to pause.

Use [method`Foundry`.DebuggerThread.interrupt] in new code.

Deprecated since version 1.1.

do_list_address_space() virtual
Return type:

Gio.ListModel

Gets a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerMappedRegion] that is updated based on the address mapping of the debuggee.

do_list_log_messages() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerLogMessage].

Return type:

Gio.ListModel

Lists available log messages from the debugger instance.

New in version 1.1.

do_list_modules() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerTrap]

Return type:

Gio.ListModel

Lists the known modules loaded into the address space.

do_list_thread_groups() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerThreadGroup]

Return type:

Gio.ListModel

List thread groups known to the debugger.

do_list_threads() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerThread]

Return type:

Gio.ListModel

List threads known to the debugger.

do_list_traps() virtual
Returns:

a [iface`Gio`.ListModel] of [class`Foundry`.DebuggerTrap]

Return type:

Gio.ListModel

List known traps (breakpoints, countpoints, watchpoints) that have been registered with the debugger.

do_move(movement) virtual
Parameters:

movement (Foundry.DebuggerMovement) – how to move within the debugger

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Use [method`Foundry`.DebuggerThread.move] in new code.

Deprecated since version 1.1.

do_send_signal(signum) virtual
Parameters:

signum (int) –

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Send signal signum to debuggee.

do_stop() virtual
Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Stop the debugger fully. This should at least cause the inferior to be sent a terminating signal.

do_trap(params) virtual
Parameters:

params (Foundry.DebuggerTrapParams) – the params for creating the new trap

Returns:

a [class`Dex`.Future] that resolves to any value or rejects with error.

Return type:

Dex.Future

Register a new breakpoint based on params.

Signal Details

Foundry.Debugger.signals.event(debugger, object)
Signal Name:

event

Flags:

RUN_LAST

Parameters:

Property Details

Foundry.Debugger.props.address_space
Name:

address-space

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE

Foundry.Debugger.props.log_messages
Name:

log-messages

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE

Foundry.Debugger.props.modules
Name:

modules

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE

Foundry.Debugger.props.primary_thread
Name:

primary-thread

Type:

Foundry.DebuggerThread

Default Value:

None

Flags:

READABLE

The first thread that was created by the debugger.

New in version 1.1.

Foundry.Debugger.props.terminated
Name:

terminated

Type:

bool

Default Value:

False

Flags:

READABLE

If the debuggee has terminated.

New in version 1.1.

Foundry.Debugger.props.threads
Name:

threads

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE

New in version 1.1.

Foundry.Debugger.props.traps
Name:

traps

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE