aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-08-28 17:21:53 +0100
committerAndrew Burgess <aburgess@redhat.com>2025-02-24 10:51:14 +0000
commite9709998fff2c7d17cf4987334749e3cfd303339 (patch)
tree04f4d696b3691e7671527014f180557d7bc5fc35 /libctf
parentffd09b625ef0970cf25d691e949b86b07a7e3cb1 (diff)
downloadbinutils-e9709998fff2c7d17cf4987334749e3cfd303339.zip
binutils-e9709998fff2c7d17cf4987334749e3cfd303339.tar.gz
binutils-e9709998fff2c7d17cf4987334749e3cfd303339.tar.bz2
gdb: restructure disable_breakpoints_in_unloaded_shlib
This commit rewrites disable_breakpoints_in_unloaded_shlib to be more like disable_breakpoints_in_freed_objfile. Instead of looping over all b/p locations, we instead loop over all b/p and then over all locations for each b/p. The advantage of doing this is that we can fix the small bug that was documented in a comment in the code: /* This may cause duplicate notifications for the same breakpoint. */ notify_breakpoint_modified (b); By calling notify_breakpoint_modified() as we modify each location we can potentially send multiple notifications for a single b/p. Is this a bug? Maybe not. After all, at each notification one of the locations will have changed, so its probably fine. But it's not ideal, and we can easily do better, so lets do that. There's a new test which checks that we only get a single notification when the shared library is unloaded. Note that the test is written as if there are multiple related but different tests within the same test file ... but there aren't currently! The next commit will add another test proc to this test script at which point the comments will make sense. I've done this to avoid unnecessary churn in the next commit. Tested-By: Hannes Domani <ssbssa@yahoo.de> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'libctf')
0 files changed, 0 insertions, 0 deletions