* python/py-inferior.c (gdbpy_inferiors): Update. Hoist

get_addr_from_python calls out of TRY_CATCH.
	(infpy_write_memory, infpy_search_memory): Likewise.
	* python/py-utils.c (get_addr_from_python): Return negative
	value on error.  Use TRY_CATCH.
	* python/python-internal.h (get_addr_from_python): Use
	CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION.
This commit is contained in:
Tom Tromey 2013-05-20 20:24:49 +00:00
parent e19d3afbf8
commit b86af38a5a
4 changed files with 69 additions and 68 deletions

View file

@ -433,7 +433,8 @@ extern PyObject *gdbpy_gdberror_exc;
extern void gdbpy_convert_exception (struct gdb_exception)
CPYCHECKER_SETS_EXCEPTION;
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr);
int get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
PyObject *gdb_py_object_from_longest (LONGEST l);
PyObject *gdb_py_object_from_ulongest (ULONGEST l);