old-cross-binutils/gdb/testsuite/gdb.python
Yit Phang Khoo b9516fa158 Refactor Python "gdb" module into a proper Python package, by introducing
a new "_gdb" module for code implemented in C, and using reload/__import__
instead of exec.

gdb/

	* python/lib/gdb/__init__.py: Import * from _gdb.
	(GdbOutputFile, sys.stdout, GdbOutputErrorFile, sys.stderr,
	prompt_hook, sys.argv): Moved from finish_python_initialization.
	(pretty_printers, PYTHONDIR): Moved from _initialize_python.
	(packages, auto_load_packages): New list and function replacing
	module_dict and auto-loading code, using __file__ instead of
	gdb.PYTHONDIR and reload/__import__ instead of exec.
	(GdbSetPythonDirectory): Replacing function of the same name
	from finish_python_initialization, using reload/__import__ instead
	of exec, as well as call auto_load_packages.
	* python/py-prettyprint.c (find_pretty_printer_from_gdb): Check
	gdb_python_module and not gdb_module.
	* python/python-internal.h (gdb_python_module): Declare.
	* python/python.c (gdb_python_module): New global.
	(before_prompt_hook): Check gdb_python_module and not gdb_module.
	(_initialize_python): Rename gdb module to _gdb.
	Move gdb.PYTHONDIR and gdb.pretty_printer to lib/gdb/__init__.py.
	(finish_python_initialization): Move Python code to
	lib/gdb/__init__.py; instead, set up sys.path and import gdb into
	__main__.

gdb/testsuite/

	* gdb.python/python.exp (Test stderr location): Update module
	location of GDB-specific sys.stderr.
	(Test stdout location): Ditto for sys.stdout.
2012-09-13 21:49:32 +00:00
..
lib-types.cc
lib-types.exp gdb/testsuite/ 2012-06-24 06:36:27 +00:00
Makefile.in
py-block.c
py-block.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-breakpoint.c
py-breakpoint.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-cmd.exp
py-error.exp
py-error.py
py-events-shlib.c
py-events.c
py-events.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-events.py
py-evsignal.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-evthreads.c
py-evthreads.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-explore-cc.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-explore.c
py-explore.cc
py-explore.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-finish-breakpoint.c
py-finish-breakpoint.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-finish-breakpoint.py
py-finish-breakpoint2.cc
py-finish-breakpoint2.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-finish-breakpoint2.py
py-frame-inline.c
py-frame-inline.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-frame.c
py-frame.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-function.exp
py-inferior.c gdb/ 2012-07-26 19:09:35 +00:00
py-inferior.exp gdb/ 2012-07-26 19:09:35 +00:00
py-infthread.c
py-infthread.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-mi.exp PR python/14386: 2012-08-06 18:44:45 +00:00
py-objfile-script-gdb.py.in
py-objfile-script.c
py-objfile-script.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-objfile.c
py-objfile.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-parameter.exp
py-pp-maint.c
py-pp-maint.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-pp-maint.py
py-prettyprint.c PR python/14386: 2012-08-06 18:44:45 +00:00
py-prettyprint.exp gdb/ 2012-07-16 19:15:39 +00:00
py-prettyprint.py PR python/14386: 2012-08-06 18:44:45 +00:00
py-progspace.c
py-progspace.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-prompt.c
py-prompt.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-section-script.c
py-section-script.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-section-script.py
py-shared-sl.c
py-shared.c
py-shared.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-strfns.c Add $_memeq, $_regex, $_streq, $_strlen convenience functions. 2012-08-10 20:26:00 +00:00
py-strfns.exp Add $_memeq, $_regex, $_streq, $_strlen convenience functions. 2012-08-10 20:26:00 +00:00
py-symbol.c 2012-06-26 Siva Chandra Reddy <sivachandra@google.com> 2012-06-27 00:21:21 +00:00
py-symbol.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-symtab.exp 2012-06-26 Siva Chandra Reddy <sivachandra@google.com> 2012-06-27 00:21:21 +00:00
py-template.cc
py-template.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-type.c
py-type.exp Add $_memeq, $_regex, $_streq, $_strlen convenience functions. 2012-08-10 20:26:00 +00:00
py-value-cc.exp * gdb.python/lib-types.exp: Use standard_testfile, 2012-06-22 17:59:33 +00:00
py-value.c
py-value.cc
py-value.exp (test_subscript_regression): Remove no longer necessary globals, 2012-09-06 17:57:41 +00:00
python-1.c
python.c
python.exp Refactor Python "gdb" module into a proper Python package, by introducing 2012-09-13 21:49:32 +00:00
source1
source2.py