[PATCH] Accept gdb.Value in more Python APIs

Tom Tromey tom@tromey.com
Fri Jul 8 20:16:02 GMT 2022


>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> PR python/27000 points out that gdb.block_for_pc will accept a Python
Tom> integer, but not a gdb.Value.  This patch corrects this oversight.

Tom> I looked at all uses of GDB_PY_LLU_ARG and fixed these up to use
Tom> get_addr_from_python instead.  I also looked at uses of GDB_PY_LL_ARG,
Tom> but those seemed relatively unlikely to be useful with a gdb.Value, so
Tom> I didn't change them.  My thinking here is that a Value will typically
Tom> come from inferior memory, and something like a line number is not too
Tom> likely to be found this way.

Tom> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27000

I'm checking this in.

Tom


More information about the Gdb-patches mailing list