mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-1268: Fix recording of multiple register banks. Supports GP-2870.
This commit is contained in:
parent
79c0f3f1de
commit
f2b0883c70
12 changed files with 93 additions and 35 deletions
|
@ -13,6 +13,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.util.Set;
|
||||
|
||||
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
|
||||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.app.services.*;
|
||||
|
@ -69,10 +71,12 @@ public class RefreshRegistersScript extends GhidraScript {
|
|||
// Now, we need to get the relevant recorder
|
||||
TraceRecorder recorder = modelService.getRecorder(current.getTrace());
|
||||
// There's a chance of an NPE here if there is no "current frame"
|
||||
TargetRegisterBank bank =
|
||||
recorder.getTargetRegisterBank(current.getThread(), current.getFrame());
|
||||
// Now do the same to the bank as before
|
||||
bank.invalidateCaches().get();
|
||||
bank.fetchElements(true).get();
|
||||
Set<TargetRegisterBank> banks =
|
||||
recorder.getTargetRegisterBanks(current.getThread(), current.getFrame());
|
||||
for (TargetRegisterBank bank : banks) {
|
||||
// Now do the same to the bank as before
|
||||
bank.invalidateCaches().get();
|
||||
bank.fetchElements(true).get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue