binutils-gdb/gdb/python
Andrew Burgess edeaceda7b gdb: startup commands to control Python extension language
Add two new commands to GDB that can be placed into the early
initialization to control how Python starts up.  The new options are:

  set python ignore-environment on|off
  set python dont-write-bytecode auto|on|off

  show python ignore-environment
  show python dont-write-bytecode

These can be used from GDB's startup file to control how the Python
extension language behaves.  These options are equivalent to the -E
and -B flags to python respectively, their descriptions from the
Python man page:

  -E     Ignore environment variables like PYTHONPATH and PYTHONHOME
         that modify the  behavior  of  the  interpreter.

  -B     Don't write .pyc files on import.

gdb/ChangeLog:

	* NEWS: Mention new commands.
	* python/python.c (python_ignore_environment): New static global.
	(show_python_ignore_environment): New function.
	(set_python_ignore_environment): New function.
	(python_dont_write_bytecode): New static global.
	(show_python_dont_write_bytecode): New function.
	(set_python_dont_write_bytecode): New function.
	(_initialize_python): Register new commands.

gdb/doc/ChangeLog:

	* python.texinfo (Python Commands): Mention new commands.

gdb/testsuite/ChangeLog:

	* gdb.python/py-startup-opt.exp: New file.
2021-04-28 09:56:22 +01:00
..
lib/gdb Use importlib instead of imp module on python 3.4+ 2021-04-01 12:26:52 -06:00
py-all-events.def
py-arch.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-auto-load.c
py-block.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-bpevent.c
py-breakpoint.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
py-cmd.c
py-continueevent.c
py-event-types.def
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
py-frame.c
py-framefilter.c
py-function.c
py-gdb-readline.c
py-inferior.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-infevents.c
py-infthread.c
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c
py-objfile.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-param.c gdb/doc: fix the example for get_set_string in Python API docs 2021-03-18 16:55:37 +00:00
py-prettyprint.c
py-progspace.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-record-btrace.c
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h
py-registers.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-symtab.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-threadevent.c
py-tui.c
py-type.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-unwind.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-utils.c
py-value.c
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h
python.c gdb: startup commands to control Python extension language 2021-04-28 09:56:22 +01:00
python.h