aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-config.py
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-04-05 15:37:00 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-03-31 11:13:02 +0100
commit3d42db971fc7cb0a5fe9b4526b12539019b5c27e (patch)
tree43db0bcce16a24a74d2c430f72de1e5bad33a8a4 /gdb/python/python-config.py
parentea020765286f1573abf95753c3f66c7e5e20a551 (diff)
downloadbinutils-3d42db971fc7cb0a5fe9b4526b12539019b5c27e.zip
binutils-3d42db971fc7cb0a5fe9b4526b12539019b5c27e.tar.gz
binutils-3d42db971fc7cb0a5fe9b4526b12539019b5c27e.tar.bz2
gdb: change 'if' to gdb_assert in update_dprintf_command_list
I noticed in update_dprintf_command_list that we handle the case where the bp_dprintf style breakpoint doesn't have a format and args string. However, I don't believe such a situation is possible. The obvious approach certainly already catches this case: (gdb) dprintf main Format string required If it is possible to create a dprintf breakpoint without a format and args string then I think we should be catching this case and handling it at creation time, rather than having GDB just ignore the situation later on. And so, I propose that we change the 'if' that ignores the case where the format/args string is empty, and instead assert that we do always have a format/args string. The original code, that handled an empty format/args string has existed since commit e7e0cddfb0d4, which is when dprintf support was added to GDB. If I'm correct and this situation can't ever happen then there should be no user visible changes after this commit.
Diffstat (limited to 'gdb/python/python-config.py')
0 files changed, 0 insertions, 0 deletions