This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Python pretty-printing [3/6]
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
>> +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
Daniel> So the constructor does a lookup. This will be a little weird if we
Daniel> want to create types from scratch someday (could be very useful).
At that point we can always make the constructor change its behavior
depending on the runtime type of the argument.
t = Type(gdb.STRUCT) # make a new struct, STRUCT is an int
t = Type("whatever") # look up "whatever"
Daniel> And what happens if name is not given?
This is some relic or misconception in the code... the name need not
be optional.
Daniel> Anyway, I wonder if there shouldn't be an explicit lookup
Daniel> routine instead.
I like it ok the way it is. But, if you really want it changed, I
will do that; now is not a super time to do this, but it will only be
harder in the future. Thiago, what do you think?
Tom