Bump gdb to 15.0.* (#12804)

Closes: #12777
This commit is contained in:
Sebastian Rittau
2024-10-14 14:51:22 +02:00
committed by GitHub
parent ddf9d54dc1
commit 42f6a21a71
33 changed files with 337 additions and 133 deletions

View File

@@ -8,7 +8,6 @@ gdb.FinishBreakpoint.out_of_scope
gdb.Parameter.get_set_string
gdb.Parameter.get_show_string
# TODO: abstract/optional methods to be implemented by subclasses
# gdb.FinishBreakpoint.out_of_scope
gdb.Breakpoint.stop
@@ -30,15 +29,13 @@ gdb.TuiWindow
gdb.command
gdb.command.explore
gdb.command.frame_filters
gdb.command.missing_debug
gdb.command.pretty_printers
gdb.command.prompt
gdb.command.type_printers
gdb.command.unwinders
gdb.command.xmethods
# module is auto-imported with gdb and cannot be imported on its own
gdb.events
# implementing internal convenience functions
gdb.function
gdb.function.as_string
@@ -74,9 +71,8 @@ gdb.xmethods
gdb.Objfile.xmethods
gdb.Progspace.xmethods
# Python 2 compatibility defines
gdb.FrameDecorator.basestring
gdb.printing.basestring
gdb.printing.long
gdb.xmethod.basestring
gdb.xmethod.long
# stubtest thinks this can't be sub-classed at runtime, but it is
gdb.disassembler.DisassemblerPart
# incomplete modules
gdb\.dap\.[a-z_]+\.[A-Za-z_]+

View File

@@ -1,4 +1,4 @@
version = "12.1.*"
version = "15.0.*"
# This is the official web portal for GDB,
# see https://sourceware.org/gdb/current/ for other ways of obtaining the source code.
upstream_repository = "https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=tree"

View File

@@ -7,13 +7,18 @@ class SymValueWrapper(Protocol):
def symbol(self) -> gdb.Symbol | str: ...
def value(self) -> gdb._ValueOrNative | None: ...
class FrameDecorator:
class _FrameDecoratorBase:
def __init__(self, base: gdb.Frame | FrameDecorator) -> None: ...
def elided(self) -> Iterator[gdb.Frame] | None: ...
def function(self) -> str | None: ...
def address(self) -> int | None: ...
def filename(self) -> str | None: ...
def line(self) -> int | None: ...
def frame_args(self) -> Iterator[SymValueWrapper] | None: ...
def frame_locals(self) -> Iterator[SymValueWrapper] | None: ...
def inferior_frame(self) -> gdb.Frame: ...
class FrameDecorator(_FrameDecoratorBase):
def filename(self) -> str | None: ...
class DAPFrameDecorator(_FrameDecoratorBase):
def filename(self) -> str | None: ...

View File

@@ -5,5 +5,4 @@ class FrameIterator:
def __init__(self, frame_obj: gdb.Frame) -> None: ...
def __iter__(self) -> FrameIterator: ...
def next(self) -> gdb.Frame: ...
def __next__(self) -> gdb.Frame: ...

View File

@@ -3,9 +3,11 @@
# (https://sourceware.org/gdb/onlinedocs/gdb/Python-API.html).
import _typeshed
import threading
from _typeshed import Incomplete
from collections.abc import Callable, Iterator, Mapping, Sequence
from contextlib import AbstractContextManager
from typing import Any, Generic, Literal, Protocol, TypeVar, final, overload
from typing import Any, Final, Generic, Literal, Protocol, TypeVar, final, overload
from typing_extensions import TypeAlias, deprecated
import gdb.FrameDecorator
@@ -136,6 +138,8 @@ class Value:
def string(self, encoding: str = ..., errors: str = ..., length: int = ...) -> str: ...
def lazy_string(self, encoding: str = ..., length: int = ...) -> LazyString: ...
def fetch_lazy(self) -> None: ...
def assign(self, val): ...
def to_array(self): ...
# Types
@@ -193,33 +197,46 @@ class Field:
type: Type | None
parent_type: Type
TYPE_CODE_PTR: int
TYPE_CODE_ARRAY: int
TYPE_CODE_STRUCT: int
TYPE_CODE_UNION: int
TYPE_CODE_ENUM: int
TYPE_CODE_FLAGS: int
TYPE_CODE_FUNC: int
TYPE_CODE_INT: int
TYPE_CODE_FLT: int
TYPE_CODE_VOID: int
TYPE_CODE_SET: int
TYPE_CODE_RANGE: int
TYPE_CODE_STRING: int
TYPE_CODE_BITSTRING: int
TYPE_CODE_ERROR: int
TYPE_CODE_METHOD: int
TYPE_CODE_METHODPTR: int
TYPE_CODE_MEMBERPTR: int
TYPE_CODE_REF: int
TYPE_CODE_RVALUE_REF: int
TYPE_CODE_CHAR: int
TYPE_CODE_BOOL: int
TYPE_CODE_COMPLEX: int
TYPE_CODE_TYPEDEF: int
TYPE_CODE_NAMESPACE: int
TYPE_CODE_DECFLOAT: int
TYPE_CODE_INTERNAL_FUNCTION: int
TYPE_CODE_BITSTRING: Final = -1
TYPE_CODE_PTR: Final = 1
TYPE_CODE_ARRAY: Final = 2
TYPE_CODE_STRUCT: Final = 3
TYPE_CODE_UNION: Final = 4
TYPE_CODE_ENUM: Final = 5
TYPE_CODE_FLAGS: Final = 6
TYPE_CODE_FUNC: Final = 7
TYPE_CODE_INT: Final = 8
TYPE_CODE_FLT: Final = 9
TYPE_CODE_VOID: Final = 10
TYPE_CODE_SET: Final = 11
TYPE_CODE_RANGE: Final = 12
TYPE_CODE_STRING: Final = 13
TYPE_CODE_ERROR: Final = 14
TYPE_CODE_METHOD: Final = 15
TYPE_CODE_METHODPTR: Final = 16
TYPE_CODE_MEMBERPTR: Final = 17
TYPE_CODE_REF: Final = 18
TYPE_CODE_RVALUE_REF: Final = 19
TYPE_CODE_CHAR: Final = 20
TYPE_CODE_BOOL: Final = 21
TYPE_CODE_COMPLEX: Final = 22
TYPE_CODE_TYPEDEF: Final = 23
TYPE_CODE_NAMESPACE: Final = 24
TYPE_CODE_DECFLOAT: Final = 25
TYPE_CODE_MODULE: Final = 26
TYPE_CODE_INTERNAL_FUNCTION: Final = 27
TYPE_CODE_XMETHOD: Final = 28
TYPE_CODE_FIXED_POINT: Final = 29
TYPE_CODE_NAMELIST: Final = 30
SEARCH_UNDEF_DOMAIN: Final[int]
SEARCH_VAR_DOMAIN: Final[int]
SEARCH_STRUCT_DOMAIN: Final[int]
SEARCH_MODULE_DOMAIN: Final[int]
SEARCH_LABEL_DOMAIN: Final[int]
SEARCH_COMMON_BLOCK_DOMAIN: Final[int]
SEARCH_TYPE_DOMAIN: Final[int]
SEARCH_FUNCTION_DOMAIN: Final[int]
# Pretty Printing
@@ -259,8 +276,16 @@ class PendingFrame:
def read_register(self, reg: str | RegisterDescriptor | int, /) -> Value: ...
def create_unwind_info(self, frame_id: object, /) -> UnwindInfo: ...
def architecture(self) -> Architecture: ...
def language(self): ...
def level(self) -> int: ...
def name(self) -> str: ...
def pc(self) -> int: ...
def block(self) -> Block: ...
def find_sal(self) -> Symtab_and_line: ...
def function(self) -> Symbol: ...
def is_valid(self) -> bool: ...
@final
class UnwindInfo:
def add_saved_register(self, reg: str | RegisterDescriptor | int, value: Value, /) -> None: ...
@@ -281,6 +306,8 @@ class Inferior:
pid: int
was_attached: bool
progspace: Progspace
main_name: Incomplete
arguments: Incomplete
def is_valid(self) -> bool: ...
def threads(self) -> tuple[InferiorThread, ...]: ...
@@ -291,9 +318,14 @@ class Inferior:
def thread_from_handle(self, handle: Value) -> InferiorThread: ...
@deprecated("Use gdb.thread_from_handle() instead.")
def thread_from_thread_handle(self, handle: Value) -> InferiorThread: ...
def set_env(self, name: str, value: str) -> None: ...
def unset_env(self, name: str) -> None: ...
def clear_env(self) -> None: ...
# Threads
class Thread(threading.Thread): ...
def selected_thread() -> InferiorThread: ...
@final
class InferiorThread:
@@ -302,6 +334,7 @@ class InferiorThread:
num: int
global_num: int
ptid: tuple[int, int, int]
ptid_string: str
inferior: Inferior
def is_valid(self) -> bool: ...
@@ -429,15 +462,19 @@ def current_progspace() -> Progspace | None: ...
def progspaces() -> Sequence[Progspace]: ...
@final
class Progspace:
filename: str
executable_filename: str | None
filename: str | None
symbol_file: Objfile | None
pretty_printers: list[_PrettyPrinterLookupFunction]
type_printers: list[gdb.types._TypePrinter]
frame_filters: dict[str, _FrameFilter]
frame_unwinders: list[gdb.unwinder.Unwinder]
missing_debug_handlers: Incomplete
def block_for_pc(self, pc: int, /) -> Block | None: ...
def find_pc_line(self, pc: int, /) -> Symtab_and_line: ...
def is_valid(self) -> bool: ...
def objfile_for_address(self, address: int, /) -> Objfile | None: ...
def objfiles(self) -> Sequence[Objfile]: ...
def solib_name(self, address: int, /) -> str | None: ...
@@ -457,6 +494,7 @@ class Objfile:
type_printers: list[gdb.types._TypePrinter]
frame_filters: dict[str, _FrameFilter]
frame_unwinders: list[gdb.unwinder.Unwinder]
is_file: bool
def is_valid(self) -> bool: ...
def add_separate_debug_file(self, file: str) -> None: ...
@@ -504,6 +542,8 @@ class Frame:
def read_var(self, variable: str | Symbol, /, block: Block | None = ...) -> Value: ...
def select(self) -> None: ...
def level(self) -> int: ...
def static_link(self) -> Incomplete | None: ...
def language(self): ...
# Blocks
@@ -552,34 +592,31 @@ class Symbol:
def is_valid(self) -> bool: ...
def value(self, frame: Frame = ..., /) -> Value: ...
SYMBOL_UNDEF_DOMAIN: int
SYMBOL_VAR_DOMAIN: int
SYMBOL_STRUCT_DOMAIN: int
SYMBOL_LABEL_DOMAIN: int
SYMBOL_MODULE_DOMAIN: int
SYMBOL_COMMON_BLOCK_DOMAIN: int
SYMBOL_UNDEF_DOMAIN: Final = 0
SYMBOL_VAR_DOMAIN: Final = 1
SYMBOL_STRUCT_DOMAIN: Final = 2
SYMBOL_MODULE_DOMAIN: Final = 3
SYMBOL_LABEL_DOMAIN: Final = 4
SYMBOL_COMMON_BLOCK_DOMAIN: Final = 5
SYMBOL_TYPE_DOMAIN: Final = 6
SYMBOL_FUNCTION_DOMAIN: Final = 7
# The constants were never correct. Use gdb.SYMBOL_VAR_DOMAIN instead.
SYMBOL_VARIABLES_DOMAIN: int
SYMBOL_FUNCTIONS_DOMAIN: int
SYMBOL_TYPES_DOMAIN: int
SYMBOL_LOC_UNDEF: int
SYMBOL_LOC_CONST: int
SYMBOL_LOC_STATIC: int
SYMBOL_LOC_REGISTER: int
SYMBOL_LOC_ARG: int
SYMBOL_LOC_REF_ARG: int
SYMBOL_LOC_REGPARM_ADDR: int
SYMBOL_LOC_LOCAL: int
SYMBOL_LOC_TYPEDEF: int
SYMBOL_LOC_LABEL: int
SYMBOL_LOC_BLOCK: int
SYMBOL_LOC_CONST_BYTES: int
SYMBOL_LOC_UNRESOLVED: int
SYMBOL_LOC_OPTIMIZED_OUT: int
SYMBOL_LOC_COMPUTED: int
SYMBOL_LOC_COMMON_BLOCK: int
SYMBOL_LOC_UNDEF: Final = 0
SYMBOL_LOC_CONST: Final = 1
SYMBOL_LOC_STATIC: Final = 2
SYMBOL_LOC_REGISTER: Final = 3
SYMBOL_LOC_ARG: Final = 4
SYMBOL_LOC_REF_ARG: Final = 5
SYMBOL_LOC_REGPARM_ADDR: Final = 6
SYMBOL_LOC_LOCAL: Final = 7
SYMBOL_LOC_TYPEDEF: Final = 8
SYMBOL_LOC_LABEL: Final = 9
SYMBOL_LOC_BLOCK: Final = 10
SYMBOL_LOC_CONST_BYTES: Final = 11
SYMBOL_LOC_UNRESOLVED: Final = 12
SYMBOL_LOC_OPTIMIZED_OUT: Final = 13
SYMBOL_LOC_COMPUTED: Final = 14
SYMBOL_LOC_COMMON_BLOCK: Final = 15
# Symbol tables
@@ -658,10 +695,22 @@ class Breakpoint:
temporary: bool
hit_count: int
location: str | None
locations: Incomplete
inferior: int | None
expression: str | None
condition: str | None
commands: str | None
@final
class BreakpointLocation:
address: Incomplete
enabled: bool
fullname: str
function: Incomplete
owner: Incomplete
source: Incomplete
thread_groups: Incomplete
BP_NONE: int
BP_BREAKPOINT: int
BP_HARDWARE_BREAKPOINT: int
@@ -768,18 +817,26 @@ class ExitedEvent(Event):
exit_code: int
inferior: Inferior
class ThreadExitedEvent(Event): ...
class StopEvent(ThreadEvent): ...
class BreakpointEvent(StopEvent):
breakpoints: Sequence[Breakpoint]
breakpoint: Breakpoint
missing_debug_handlers: list[Incomplete]
class NewObjFileEvent(Event):
new_objfile: Objfile
class FreeObjFileEvent(Event): ...
class ClearObjFilesEvent(Event):
progspace: Progspace
class NewProgspaceEvent(Event): ...
class FreeProgspaceEvent(Event): ...
class SignalEvent(StopEvent):
stop_signal: str
@@ -815,9 +872,15 @@ class GdbExitingEvent(Event):
class ConnectionEvent(Event):
connection: TargetConnection
class ExecutableChangedEvent(Event): ...
_ET = TypeVar("_ET", bound=Event | Breakpoint | None)
@final
class EventRegistry(Generic[_ET]):
def connect(self, object: Callable[[_ET], object], /) -> None: ...
def disconnect(self, object: Callable[[_ET], object], /) -> None: ...
class ValuePrinter: ...
def blocked_signals(): ...

View File

@@ -0,0 +1,13 @@
from typing import Any
class Server:
def __init__(self, in_stream, out_stream, child_stream) -> None: ...
def main_loop(self) -> None: ...
def send_event(self, event: str, body: Any | None = None) -> None: ... # body is an arbitrary object
def send_event_later(self, event: str, body: Any | None = None) -> None: ... # body is an arbitrary object
def shutdown(self) -> None: ...
def pre_command_loop() -> None: ...
def run() -> None: ...
session_started: bool

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

3
stubs/gdb/gdb/dap/bt.pyi Normal file
View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

3
stubs/gdb/gdb/dap/io.pyi Normal file
View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,3 @@
from _typeshed import Incomplete
def __getattr__(name: str) -> Incomplete: ...

View File

@@ -0,0 +1,57 @@
from _typeshed import Incomplete
from typing import Final, final
import gdb
class Disassembler:
def __init__(self, name: str) -> None: ...
def __call__(self, info): ...
class DisassembleInfo:
address: Incomplete
architecture: Incomplete
progspace: Incomplete
def __init__(self, /, *args, **kwargs) -> None: ...
def address_part(self, address) -> DisassemblerAddressPart: ...
def is_valid(self) -> bool: ...
def read_memory(self, len, offset: int = 0): ...
def text_part(self, string, style) -> DisassemblerTextPart: ...
class DisassemblerPart:
def __init__(self, /, *args, **kwargs) -> None: ...
@final
class DisassemblerAddressPart(DisassemblerPart):
address: Incomplete
string: str
@final
class DisassemblerTextPart(DisassemblerPart):
string: str
style: Incomplete
@final
class DisassemblerResult:
def __init__(self, /, *args, **kwargs) -> None: ...
length: Incomplete
parts: Incomplete
string: str
STYLE_TEXT: Final = 0
STYLE_MNEMONIC: Final = 1
STYLE_SUB_MNEMONIC: Final = 2
STYLE_ASSEMBLER_DIRECTIVE: Final = 3
STYLE_REGISTER: Final = 4
STYLE_IMMEDIATE: Final = 5
STYLE_ADDRESS: Final = 6
STYLE_ADDRESS_OFFSET: Final = 7
STYLE_SYMBOL: Final = 8
STYLE_COMMENT_START: Final = 9
def builtin_disassemble(INFO: DisassembleInfo, MEMORY_SOURCE: Incomplete | None = None) -> None: ...
class maint_info_py_disassemblers_cmd(gdb.Command):
def __init__(self) -> None: ...
def invoke(self, args, from_tty): ...
def register_disassembler(disassembler: type[Disassembler], architecture: str | None = None): ...

View File

@@ -1,64 +1,24 @@
from typing_extensions import TypeAlias
import gdb
ContinueEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ContinueEvent]
cont: ContinueEventRegistry
ExitedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ExitedEvent]
exited: ExitedEventRegistry
StopEventRegistry: TypeAlias = gdb.EventRegistry[gdb.StopEvent]
stop: StopEventRegistry
NewObjFileEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewObjFileEvent]
new_objfile: NewObjFileEventRegistry
ClearObjFilesEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ClearObjFilesEvent]
clear_objfiles: ClearObjFilesEventRegistry
InferiorCallEventRegistry: TypeAlias = gdb.EventRegistry[gdb._InferiorCallEvent]
inferior_call: InferiorCallEventRegistry
MemoryChangedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.MemoryChangedEvent]
memory_changed: MemoryChangedEventRegistry
RegisterChangedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.RegisterChangedEvent]
register_changed: RegisterChangedEventRegistry
BreakpointEventRegistry: TypeAlias = gdb.EventRegistry[gdb.Breakpoint]
breakpoint_created: BreakpointEventRegistry
breakpoint_modified: BreakpointEventRegistry
breakpoint_deleted: BreakpointEventRegistry
BeforePromptEventRegistry: TypeAlias = gdb.EventRegistry[None]
before_prompt: BeforePromptEventRegistry
NewInferiorEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewInferiorEvent]
new_inferior: NewInferiorEventRegistry
InferiorDeletedEventRegistry: TypeAlias = gdb.EventRegistry[gdb.InferiorDeletedEvent]
inferior_deleted: InferiorDeletedEventRegistry
NewThreadEventRegistry: TypeAlias = gdb.EventRegistry[gdb.NewThreadEvent]
new_thread: NewThreadEventRegistry
GdbExitingEventRegistry: TypeAlias = gdb.EventRegistry[gdb.GdbExitingEvent]
gdb_exiting: GdbExitingEventRegistry
ConnectionEventRegistry: TypeAlias = gdb.EventRegistry[gdb.ConnectionEvent]
connection_removed: ConnectionEventRegistry
cont: gdb.EventRegistry[gdb.ContinueEvent]
exited: gdb.EventRegistry[gdb.ExitedEvent]
thread_exited: gdb.EventRegistry[gdb.ThreadExitedEvent]
stop: gdb.EventRegistry[gdb.StopEvent]
new_objfile: gdb.EventRegistry[gdb.NewObjFileEvent]
free_objfile: gdb.EventRegistry[gdb.FreeObjFileEvent]
clear_objfiles: gdb.EventRegistry[gdb.ClearObjFilesEvent]
new_progspace: gdb.EventRegistry[gdb.NewProgspaceEvent]
free_progspace: gdb.EventRegistry[gdb.FreeProgspaceEvent]
inferior_call: gdb.EventRegistry[gdb._InferiorCallEvent]
memory_changed: gdb.EventRegistry[gdb.MemoryChangedEvent]
register_changed: gdb.EventRegistry[gdb.RegisterChangedEvent]
breakpoint_created: gdb.EventRegistry[gdb.Breakpoint]
breakpoint_modified: gdb.EventRegistry[gdb.Breakpoint]
breakpoint_deleted: gdb.EventRegistry[gdb.Breakpoint]
before_prompt: gdb.EventRegistry[None]
new_inferior: gdb.EventRegistry[gdb.NewInferiorEvent]
inferior_deleted: gdb.EventRegistry[gdb.InferiorDeletedEvent]
new_thread: gdb.EventRegistry[gdb.NewThreadEvent]
gdb_exiting: gdb.EventRegistry[gdb.GdbExitingEvent]
connection_removed: gdb.EventRegistry[gdb.ConnectionEvent]
executable_changed: gdb.EventRegistry[gdb.ExecutableChangedEvent]

View File

@@ -0,0 +1,12 @@
from _typeshed import Incomplete
import gdb
class MissingDebugHandler:
@property
def name(self) -> str: ...
enabled: bool
def __init__(self, name: str) -> None: ...
def __call__(self, objfile: gdb.Objfile) -> bool | str | None: ...
def register_handler(locus: Incomplete | None, handler: MissingDebugHandler, replace: bool = False) -> None: ...

View File

@@ -24,8 +24,33 @@ class RegexpCollectionPrettyPrinter(PrettyPrinter):
class FlagEnumerationPrinter(PrettyPrinter):
def __init__(self, enum_type: str) -> None: ...
class NoOpArrayPrinter(gdb.ValuePrinter):
def __init__(self, ty, value) -> None: ...
def child(self, i): ...
def children(self): ...
def display_hint(self): ...
def num_children(self): ...
def to_string(self) -> str: ...
class NoOpPointerReferencePrinter(gdb.ValuePrinter):
def __init__(self, value) -> None: ...
def child(self, i): ...
def children(self): ...
def num_children(self): ...
def to_string(self) -> str: ...
class NoOpScalarPrinter(gdb.ValuePrinter):
def __init__(self, value) -> None: ...
def to_string(self) -> str: ...
class NoOpStructPrinter(gdb.ValuePrinter):
def __init__(self, ty, value) -> None: ...
def children(self): ...
def to_string(self) -> str: ...
def register_pretty_printer(
obj: gdb.Objfile | gdb.Progspace | None,
printer: PrettyPrinter | Callable[[gdb.Value], gdb._PrettyPrinter | None],
replace: bool = ...,
) -> None: ...
def make_visualizer(value: gdb.Value): ...

View File

@@ -1,8 +1,18 @@
import gdb
from gdb import Frame, UnwindInfo
class FrameId:
def __init__(self, sp: gdb.Value | int, pc: gdb.Value | int, special: gdb.Value | int | None = None) -> None: ...
@property
def pc(self) -> gdb.Value | int: ...
@property
def sp(self) -> gdb.Value | int: ...
@property
def special(self) -> gdb.Value | int | None: ...
class Unwinder:
name: str
@property
def name(self) -> str: ...
enabled: bool
def __init__(self, name: str) -> None: ...