This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Python API questions and use cases
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.
Andre'