mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
We had a few problems with missing targetMutex acquisitions in service/debugger, this commit takes care of a few other methods (although I don't think any of these are problems in practice). - DwarfRegisterToString is removed, there is no need to call this method outside of the context of ScopeRegisters/ThreadRegisters which can directly return the function that DwarfRegisterToString would call - add lock acquisition to BuildID - remove Target, TargetGroup, TargetLock and TargetUnlock. Replace them with a single LockTargetGroup method that acquires the lock and returns the target group and the unlock function. Callers can still misuse LockTargetGroup by calling unlock immediately and continuing to use the target group but this is harder to do accidentally compared to the others.