binutils-gdb/gdb/python
Kevin Buettner 24d2cbc42c set/show python dont-write-bytecode fixes
GDB uses the environment variable PYTHONDONTWRITEBYTECODE to
determine whether or not to write the result of byte-compiling
python modules when the "python dont-write-bytecode" setting
is "auto".  Simon noticed that GDB's implementation doesn't
follow the Python documentation.

At present, GDB only checks for the existence of this environment
variable.  That is not sufficient though.  Regarding
PYTHONDONTWRITEBYTECODE, this document...

    https://docs.python.org/3/using/cmdline.html

...says:

    If this is set to a non-empty string, Python won't try to write
    .pyc files on the import of source modules.

This commit fixes GDB's handling of PYTHONDONTWRITEBYTECODE by adding
an empty string check.

This commit also corrects the set/show command documentation for
"python dont-write-bytecode".  The current doc was just a copy
of that for set/show python ignore-environment.

During his review of an earlier version of this patch, Eli Zaretskii
asked that the help text that I proposed for "set/show python
dont-write-bytecode" be expanded.  I've done that in addition to
clarifying the documentation of this option in the GDB manual.
2022-07-25 12:05:14 -07:00
..
lib/gdb Run 'black' on gdb 2022-07-15 07:55:32 -06:00
py-all-events.def Add gdb.free_objfile event registry 2022-07-18 11:25:34 -06:00
py-arch.c Accept gdb.Value in more Python APIs 2022-07-08 14:14:58 -06:00
py-auto-load.c
py-block.c
py-bpevent.c
py-breakpoint.c
py-cmd.c
py-connection.c
py-continueevent.c
py-disasm.c gdb/python: fix invalid use disassemble_info::stream 2022-07-25 19:26:24 +01:00
py-event-types.def Add gdb.free_objfile event registry 2022-07-18 11:25:34 -06:00
py-event.c
py-event.h Add gdb.free_objfile event registry 2022-07-18 11:25:34 -06:00
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c
py-finishbreakpoint.c
py-frame.c
py-framefilter.c
py-function.c
py-gdb-readline.c
py-inferior.c Add gdb.free_objfile event registry 2022-07-18 11:25:34 -06:00
py-infevents.c
py-infthread.c
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-membuf.c
py-micmd.c
py-newobjfileevent.c Add gdb.free_objfile event registry 2022-07-18 11:25:34 -06:00
py-objfile.c
py-param.c
py-prettyprint.c Add 'nibbles' to gdb.print_options 2022-07-15 09:42:39 -06:00
py-progspace.c Accept gdb.Value in more Python APIs 2022-07-08 14:14:58 -06: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
py-signalevent.c
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c
py-tui.c
py-type.c
py-unwind.c
py-utils.c
py-value.c Add 'summary' mode to Value.format_string 2022-07-15 09:26:54 -06:00
py-varobj.c Expose current 'print' settings to Python 2022-07-15 09:25:33 -06:00
py-xmethods.c
python-config.py
python-internal.h Handle Python 3.11 deprecation of PySys_SetPath and Py_SetProgramName 2022-07-20 12:14:17 -07:00
python.c set/show python dont-write-bytecode fixes 2022-07-25 12:05:14 -07:00
python.h