mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Merge remote-tracking branch 'origin/GP-953-dragonmacher-demangler-thumb-mode-fix--SQUASHED' into Ghidra_10.0
This commit is contained in:
commit
328ce71521
2 changed files with 8 additions and 3 deletions
|
@ -4,9 +4,9 @@
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@ -258,7 +258,6 @@ public abstract class AbstractDemanglerAnalyzer extends AbstractAnalyzer {
|
||||||
*/
|
*/
|
||||||
protected void apply(Program program, Address address, DemangledObject demangled,
|
protected void apply(Program program, Address address, DemangledObject demangled,
|
||||||
DemanglerOptions options, MessageLog log, TaskMonitor monitor) {
|
DemanglerOptions options, MessageLog log, TaskMonitor monitor) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (demangled.applyTo(program, address, options, monitor)) {
|
if (demangled.applyTo(program, address, options, monitor)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import ghidra.app.cmd.disassemble.DisassembleCommand;
|
import ghidra.app.cmd.disassemble.DisassembleCommand;
|
||||||
import ghidra.app.cmd.function.*;
|
import ghidra.app.cmd.function.*;
|
||||||
import ghidra.app.util.NamespaceUtils;
|
import ghidra.app.util.NamespaceUtils;
|
||||||
|
import ghidra.app.util.PseudoDisassembler;
|
||||||
import ghidra.program.database.data.DataTypeUtilities;
|
import ghidra.program.database.data.DataTypeUtilities;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.address.AddressSetView;
|
import ghidra.program.model.address.AddressSetView;
|
||||||
|
@ -378,6 +379,11 @@ public class DemangledFunction extends DemangledObject {
|
||||||
public boolean applyTo(Program program, Address address, DemanglerOptions options,
|
public boolean applyTo(Program program, Address address, DemanglerOptions options,
|
||||||
TaskMonitor monitor) throws Exception {
|
TaskMonitor monitor) throws Exception {
|
||||||
|
|
||||||
|
// Account for register context. This class may trigger disassembly, so we need to make
|
||||||
|
// sure that the context is correctly set before that happens. Also, be sure to apply
|
||||||
|
// the function to the correct address.
|
||||||
|
address = PseudoDisassembler.setTargeContextForDisassembly(program, address);
|
||||||
|
|
||||||
if (!passesPreconditions(program, address)) {
|
if (!passesPreconditions(program, address)) {
|
||||||
return true; // eventually will not return anything
|
return true; // eventually will not return anything
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue