[Lldb-commits] [PATCH] D109738: [lldb] Fix bug 38317 - Address breakpoints don't work if set before the process launches

Vadim Chugunov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Oct 10 18:24:46 PDT 2021


vadimcn added a comment.

> Is it possible to get your IDE to record the module & the address?

I don't control the definition of the protocol (FWIW it's Microsoft's Debug Adapter Protocol), but I'll look into that, maybe there's a way to sneak in extra information.   In which case, what is the correct way to save/restore instruction breakpoints across lldb runs?   Even if I save module path or UUID, there seems to be no SB API to create a breakpoint using this information.

What if the module gets recompiled?  I still could end up with my breakpoint slapped in the middle of an instruction.   It seems to me that perfect safety is just impossible here...

> More generally, using raw address breakpoints is fallible, and whenever you find yourself doing that you should probably see if you can do anything else.
> ...
> This patch as is worries me because it moves us further down the path of passing around raw addresses from run to run, and when that doesn't work it can cause hard to diagnose problems in the running of the process.

I dunno, I guess I am in the camp of "Give a stern warning, but don't second guess the developer".    It's pretty annoying when your tool refuses to do something, which you know is reasonable under the circumstances, not because of a technical limitation, but "for your own good".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109738/new/

https://reviews.llvm.org/D109738



More information about the lldb-commits mailing list