aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-cmd.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-12-03 22:54:23 +0100
committerTom de Vries <tdevries@suse.de>2024-12-03 22:54:23 +0100
commit922ab963e1c48c364b7f6363cb8e19f8a7175a20 (patch)
treee5600a16d4131bd5a2950bb9dc5eb5692253d32b /gdb/testsuite/gdb.python/py-cmd.c
parent1dc13c7e9f47718b51d8206e0b7cc8b244271ce4 (diff)
downloadbinutils-922ab963e1c48c364b7f6363cb8e19f8a7175a20.zip
binutils-922ab963e1c48c364b7f6363cb8e19f8a7175a20.tar.gz
binutils-922ab963e1c48c364b7f6363cb8e19f8a7175a20.tar.bz2
[gdb/python] Handle empty PYTHONDONTWRITEBYTECODE
When using PYTHONDONTWRITEBYTECODE with an empty string we get: ... $ PYTHONDONTWRITEBYTECODE= gdb -q -batch -ex "show python dont-write-bytecode" Python's dont-write-bytecode setting is auto (currently on). ... This is incorrect, it should be off. The actual setting is correct, that was already fixed in commit 24d2cbc42cc ("set/show python dont-write-bytecode fixes"), in function python_write_bytecode. Fix this by: - factoring out new function env_python_dont_write_bytecode out of python_write_bytecode, and - using it in show_python_dont_write_bytecode. Tested on x86_64-linux, using test-case gdb.python/py-startup-opt.exp and: - PYTHONDONTWRITEBYTECODE= - PYTHONDONTWRITEBYTECODE=1 - unset PYTHONDONTWRITEBYTECODE Approved-By: Tom Tromey <tom@tromey.com> PR python/32389 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32389
Diffstat (limited to 'gdb/testsuite/gdb.python/py-cmd.c')
0 files changed, 0 insertions, 0 deletions