mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 06:34:58 +08:00
somehow address ranges get broke for gdb modules
This commit is contained in:
+9
-18
@@ -30,10 +30,8 @@ import ghidra.program.model.address.*;
|
|||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
|
|
||||||
@TargetObjectSchemaInfo(name = "Module", elements = {
|
@TargetObjectSchemaInfo(name = "Module", elements = {
|
||||||
@TargetElementType(type = Void.class)
|
@TargetElementType(type = Void.class) }, attributes = {
|
||||||
}, attributes = {
|
@TargetAttributeType(type = Void.class) })
|
||||||
@TargetAttributeType(type = Void.class)
|
|
||||||
})
|
|
||||||
public class GdbModelTargetModule
|
public class GdbModelTargetModule
|
||||||
extends DefaultTargetObject<TargetObject, GdbModelTargetModuleContainer>
|
extends DefaultTargetObject<TargetObject, GdbModelTargetModuleContainer>
|
||||||
implements TargetModule<GdbModelTargetModule> {
|
implements TargetModule<GdbModelTargetModule> {
|
||||||
@@ -68,16 +66,10 @@ public class GdbModelTargetModule
|
|||||||
this.symbols = new GdbModelTargetSymbolContainer(this);
|
this.symbols = new GdbModelTargetSymbolContainer(this);
|
||||||
|
|
||||||
range = doGetRange(); // Likely [0,0]
|
range = doGetRange(); // Likely [0,0]
|
||||||
changeAttributes(List.of(),
|
changeAttributes(List.of(), List.of(sections, symbols),
|
||||||
List.of(
|
Map.of(VISIBLE_RANGE_ATTRIBUTE_NAME, range, RANGE_ATTRIBUTE_NAME, range,
|
||||||
sections,
|
MODULE_NAME_ATTRIBUTE_NAME, module.getName(), UPDATE_MODE_ATTRIBUTE_NAME,
|
||||||
symbols),
|
TargetUpdateMode.FIXED, DISPLAY_ATTRIBUTE_NAME, module.getName()),
|
||||||
Map.of(
|
|
||||||
VISIBLE_RANGE_ATTRIBUTE_NAME, range,
|
|
||||||
RANGE_ATTRIBUTE_NAME, range,
|
|
||||||
MODULE_NAME_ATTRIBUTE_NAME, module.getName(),
|
|
||||||
UPDATE_MODE_ATTRIBUTE_NAME, TargetUpdateMode.FIXED,
|
|
||||||
DISPLAY_ATTRIBUTE_NAME, module.getName()),
|
|
||||||
"Initialized");
|
"Initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,10 +107,9 @@ public class GdbModelTargetModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sectionsRefreshed() {
|
public void sectionsRefreshed() {
|
||||||
AddressRange range = doGetRange();
|
range = doGetRange();
|
||||||
changeAttributes(List.of(), Map.of(
|
changeAttributes(List.of(),
|
||||||
RANGE_ATTRIBUTE_NAME, range,
|
Map.of(RANGE_ATTRIBUTE_NAME, range, VISIBLE_RANGE_ATTRIBUTE_NAME, range),
|
||||||
VISIBLE_RANGE_ATTRIBUTE_NAME, range),
|
|
||||||
"Sections Refreshed");
|
"Sections Refreshed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user