This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python pretty-printing [3/6]

On Thu, Apr 02, 2009 at 02:55:41PM -0600, Tom Tromey wrote:
>  * Values From Inferior::
> +* Types From Inferior::		Python representation of types.

This isn't entirely a new problem, as you can see from context above,
but is there anything we can call this besides "From Inferior"?  Types
don't come from an inferior, they come from a program or an object

> +The following methods are provided:
> +
> +@table @code
> +@defmethod Type Type [name]
> +Construct a new instance of @code{gdb.Type}.
> +
> +If @var{name} is given, it specifies the name of a type to look up in
> +the inferior.  @var{name} is searched for globally.
> +@end defmethod

So the constructor does a lookup.  This will be a little weird if we
want to create types from scratch someday (could be very useful).
And what happens if name is not given?  Anyway, I wonder if there
shouldn't be an explicit lookup routine instead.

> +@findex TYPE_CODE_FLAGS
> +@findex gdb.TYPE_CODE_FLAGS
> +A bit flags type.
> +@c FIXME: what is this?

It's used for the x86 status register, for instance.  Try info reg
eflags.  It's more friendly than just a number (although I do get user
complaints about it; could be friendlier).

> +@findex gdb.TYPE_CODE_TEMPLATE
> +A C++ template type.  Note that this is not used for a template
> +instantiation; those appear as ordinary struct types.
> +@c FIXME I hope that is true

DWARF does not represent TYPE_CODE_TEMPLATE, as far as I know.  This
was used by the HP symbol reader.  It looks like nothing in GDB
currently creates these and they could be garbage collected (with
optional reimplementation later).

> +A C++ template argument.
> +@c FIXME: is this ever used?

No, see above.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]