* python/py-arch.c (archpy_disassemble): Update.

* python/py-type.c (typy_get_composite, typy_lookup_typename)
	(typy_lookup_type): Use GDB_PY_HANDLE_EXCEPTION.
	* python/py-utils.c (gdbpy_convert_exception): Return 'void'.
	* python/python-internal.h (CPYCHECKER_SETS_EXCEPTION): New
	macro.
	(GDB_PY_HANDLE_EXCEPTION): Update.
	(gdbpy_convert_exception): Update.  Use CPYCHECKER_SETS_EXCEPTION.
This commit is contained in:
Tom Tromey
2013-05-20 20:19:03 +00:00
parent 8919e1746d
commit 56cc411c4b
5 changed files with 35 additions and 27 deletions

View File

@ -443,13 +443,7 @@ typy_get_composite (struct type *type)
{
CHECK_TYPEDEF (type);
}
/* Don't use GDB_PY_HANDLE_EXCEPTION here because that returns
a (NULL) pointer of the wrong type. */
if (except.reason < 0)
{
gdbpy_convert_exception (except);
return NULL;
}
GDB_PY_HANDLE_EXCEPTION (except);
if (TYPE_CODE (type) != TYPE_CODE_PTR
&& TYPE_CODE (type) != TYPE_CODE_REF)
@ -732,11 +726,7 @@ typy_lookup_typename (const char *type_name, const struct block *block)
type = lookup_typename (python_language, python_gdbarch,
type_name, block, 0);
}
if (except.reason < 0)
{
gdbpy_convert_exception (except);
return NULL;
}
GDB_PY_HANDLE_EXCEPTION (except);
return type;
}
@ -785,11 +775,7 @@ typy_lookup_type (struct demangle_component *demangled,
break;
}
}
if (except.reason < 0)
{
gdbpy_convert_exception (except);
return NULL;
}
GDB_PY_HANDLE_EXCEPTION (except);
}
/* If we have a type from the switch statement above, just return