aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-lazy-string.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-04-05 16:12:05 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-03-31 11:13:34 +0100
commit8b4141cdb03e48826e2935529be7fd7499f9d815 (patch)
tree9acadf18c4d1a4aa8edcf6d459c9bc6271530683 /gdb/python/py-lazy-string.c
parent437d237a547def823434dd656e5c138a2263dd5c (diff)
downloadbinutils-8b4141cdb03e48826e2935529be7fd7499f9d815.zip
binutils-8b4141cdb03e48826e2935529be7fd7499f9d815.tar.gz
binutils-8b4141cdb03e48826e2935529be7fd7499f9d815.tar.bz2
gdb: build dprintf commands just once in code_breakpoint constructor
I noticed in code_breakpoint::code_breakpoint that we are calling update_dprintf_command_list once for each breakpoint location, when we really only need to call this once per breakpoint -- the data updated by this function, the breakpoint command list -- is per breakpoint, not per breakpoint location. Calling update_dprintf_command_list multiple times is just wasted effort, there's no per location error checking, we don't even pass the current location to the function. This commit moves the update_dprintf_command_list call outside of the per-location loop. There should be no user visible changes after this commit.
Diffstat (limited to 'gdb/python/py-lazy-string.c')
0 files changed, 0 insertions, 0 deletions