Skip to content

gdb.Type.array supports a 1 and 2 parameter version which isn't reflected in the stub #14940

@Ma-XX-oN

Description

@Ma-XX-oN

https://sourceware.org/gdb/current/onlinedocs/gdb.html/Types-In-Python.html#Types-In-Python

Function: Type.array (n1 [, n2])
Return a new gdb.Type object which represents an array of this type. If one argument is given, it is the inclusive upper bound of the array; in this case the lower bound is zero. If two arguments are given, the first argument is the lower bound of the array, and the second argument is the upper bound of the array. An array’s length must not be negative, but the bounds can be.

Also Type.vector, Type.range and others don't exist.

From stub:

class Type:
  code: int
  tag: Optional[str]
  name: Optional[str]
  def unqualified(self) -> "Type": ...
  def strip_typedefs(self) -> "Type": ...
  def fields(self) -> List["Field"]: ...
  def pointer(self) -> "Type": ...
  def target(self) -> "Type": ...
  def array(self, lo: int, hi: int) -> "Type": ...
  def template_argument(self, i: int) -> "Type": ...
  def num_template_args(self) -> int: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions