aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorjimingham <jingham@apple.com>2024-10-28 10:01:57 -0700
committerGitHub <noreply@github.com>2024-10-28 10:01:57 -0700
commitf14743794587db102c6d1b20f9c87a1ac20decfd (patch)
treec5e3a56865ee1d611a48d2a5ea90957590e521ff /clang/lib/Lex/ModuleMap.cpp
parentaf7c58b7ea853ef34462ce97739203e2da3c5894 (diff)
downloadllvm-f14743794587db102c6d1b20f9c87a1ac20decfd.zip
llvm-f14743794587db102c6d1b20f9c87a1ac20decfd.tar.gz
llvm-f14743794587db102c6d1b20f9c87a1ac20decfd.tar.bz2
Add the ability to break on call-site locations, improve inline stepping (#112939)
Previously lldb didn't support setting breakpoints on call site locations. This patch adds that ability. It would be very slow if we did this by searching all the debug information for every inlined subroutine record looking for a call-site match, so I added one restriction to the call-site support. This change will find all call sites for functions that also supply at least one line to the regular line table. That way we can use the fact that the line table search will move the location to that subsequent line (but only within the same function). When we find an actually moved source line match, we can search in the function that contained that line table entry for the call-site, and set the breakpoint location back to that. When I started writing tests for this new ability, it quickly became obvious that our support for virtual inline stepping was pretty buggy. We didn't print the right file & line number for the breakpoint, and we didn't set the position in the "virtual inlined stack" correctly when we hit the breakpoint. We also didn't step through the inlined frames correctly. There was code to try to detect the right inlined stack position, but it had been refactored a while back with the comment that it was super confusing and the refactor was supposed to make it clearer, but the refactor didn't work either. That code was made much clearer by abstracting the job of "handling the stack readjustment" to the various StopInfo's. Previously, there was a big (and buggy) switch over stop info's. Moving the responsibility to the stop info made this code much easier to reason about. We also had no tests for virtual inlined stepping (our inlined stepping test was actually written specifically to avoid the formation of a virtual inlined stack... So I also added tests for that along with the tests for setting the call-site breakpoints.
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions