Commit Graph

5 Commits

Author SHA1 Message Date
Tom Tromey 56cc411c4b * 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.
2013-05-20 20:19:03 +00:00
Tom Tromey 62eec1a534 * python/py-arch.c (arch_object_type): Use
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-block.c (block_syms_iterator_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-bpevent.c (breakpoint_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-cmd.c (cmdpy_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-continueevent.c (continue_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-event.h (GDBPY_NEW_EVENT_TYPE):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-events.h (thread_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-evtregistry.c (eventregistry_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-exitedevent.c (exited_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-finishbreakpoint.c (finish_breakpoint_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-function.c (fnpy_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-inferior.c (inferior_object_type, membuf_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-infthread.c (thread_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-lazy-string.c (lazy_string_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-newobjfileevent.c (new_objfile_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-objfile.c (objfile_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-param.c (parmpy_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-progspace.c (pspace_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-signalevent.c (signal_event_object_type):
	Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-symtab.c (symtab_object_type, sal_object_type): Use
	CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-type.c (type_object_type, field_object_type)
	(type_iterator_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
	* python/py-internal.h (CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF): New
	define.
	(value_object_type, block_object_type, symbol_object_type)
	(event_object_type, stop_event_object_type, breakpoint_object_type)
	(frame_object_type): Use CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF.
2013-05-20 20:09:01 +00:00
Tom Tromey ddb08e9caa * python/py-arch.c (archpy_disassemble): Use PyInt_Check and
PyLong_Check.
2013-02-28 20:14:08 +00:00
Siva Chandra Reddy 9f44fbc034 Add a new method 'disassemble' to gdb.Architecture class.
* python/py-arch.c (archpy_disassmble): Implementation of the
	new method gdb.Architecture.disassemble.
	(arch_object_methods): Add entry for the new method.

	* doc/gdb.texinfo (Architectures In Python): Add description
	about the new method gdb.Architecture.disassemble.

	* testsuite/gdb.python/py-arch.c: New test case
	* testsuite/gdb.python/py-arch.exp: New tests to test
	gdb.Architecture.disassemble
	* testsuite/gdb.python/Makefile.in: Add py-arch to the list of
	EXECUTABLES.
2013-02-21 01:46:57 +00:00
Siva Chandra Reddy bea883fd92 Add a new class gdb.Architecture which exposes GDB's
internal representation of architecture via GDB Python API.

	* Makefile.in: Add entries corresponding to the new file
	python/py-arch.c.
	* NEWS (Python Scripting): Add entries for the new class
	gdb.Architecture and the new method gdb.Frame.architecture.
	* python/py-arch.c: Implement gdb.Architecture class.
	* python/py-frame.c (frapy_arch): Implement the method
	gdb.Frame.architecture().
	(frame_object_methods): Add 'architecture' to the method table.
	* python/python-internal.h: Add declarations of new utility
	functions.
	* python/python.c (_initialize_python): Initialize
	gdb.Architecture class.

	* doc/gdb.texinfo (Architectures In Python): New sub-sub-section
	describing the gdb.Architecture class.
	(Frames In Python): Add description about the new method
	gdb.Frame.architecture().

	* testsuite/gdb.python/frame.exp: Add a test for
	gdb.Frame.architecture() method.
2013-01-23 19:59:13 +00:00