Skip to content

Proc

Provides values which would be available from /proc which are not fulfilled by other modules and some process/gdb flow related information.

P = ParamSpec('P') module-attribute

T = TypeVar('T') module-attribute

alive module-attribute

binary_base_addr module-attribute

binary_vmmap module-attribute

exe module-attribute

pid module-attribute

stopped_with_signal module-attribute

tether = sys.modules[__name__] module-attribute

thread_id module-attribute

tid module-attribute

module

Bases: ModuleType

alive property

Informs whether the process has a thread. However, note that it will still return True for a segfaulted thread. To detect that, consider using the stopped_with_signal method.

binary_base_addr property

binary_vmmap property

exe property

Returns the executed file path.

On remote targets, this path may not exist locally.

If you need the locally referenced file use

gdb.current_process().filename

pid property

stopped_with_signal property

Returns whether the program has stopped with a signal

Can be used to detect segfaults (but will also detect other signals)

thread_id property

tid property

OnlyWhenQemuKernel(func)

OnlyWhenRunning(func)

OnlyWithArch(arch_names)

Decorates function to work only with the specified archictectures.

dump_elf_data_section()

Dump .data section of current process's ELF file

dump_relocations_by_section_name(section_name)

Dump relocations of a section by section name of current process's ELF file

get_section_address_by_name(section_name)

Find section address of current process by section name

OnlyWhenQemuKernel(func)

OnlyWhenRunning(func)

OnlyWithArch(arch_names)