Python API questions and use cases

André Pönitz
Thu Sep 16 09:49:00 GMT 2010

On Thursday 16 September 2010 09:32:31 ext Joel Borggrén-Franck wrote:
> > I think the tricky part is getting a Value holding the appropriate
> > constant.  For that you might not have anything better, at present, than
> > parse_and_eval.
> True. Then I think this would be useful:
> gdb.new_address(addr) - returns a new gdb.Value (of type (void *)) pointing
> to addr. addr is checked to be within bounds of the address space of the
> inferior upon creation.

gdb.Value(addr).cast(gdb.lookup_type('void').pointer()) should do the trick.


More information about the Gdb mailing list