mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
somehow address ranges get broke for gdb modules
This commit is contained in:
parent
fb37deb896
commit
e6493fc41f
1 changed files with 9 additions and 18 deletions
|
@ -30,10 +30,8 @@ import ghidra.program.model.address.*;
|
|||
import ghidra.util.Msg;
|
||||
|
||||
@TargetObjectSchemaInfo(name = "Module", elements = {
|
||||
@TargetElementType(type = Void.class)
|
||||
}, attributes = {
|
||||
@TargetAttributeType(type = Void.class)
|
||||
})
|
||||
@TargetElementType(type = Void.class) }, attributes = {
|
||||
@TargetAttributeType(type = Void.class) })
|
||||
public class GdbModelTargetModule
|
||||
extends DefaultTargetObject<TargetObject, GdbModelTargetModuleContainer>
|
||||
implements TargetModule<GdbModelTargetModule> {
|
||||
|
@ -68,16 +66,10 @@ public class GdbModelTargetModule
|
|||
this.symbols = new GdbModelTargetSymbolContainer(this);
|
||||
|
||||
range = doGetRange(); // Likely [0,0]
|
||||
changeAttributes(List.of(),
|
||||
List.of(
|
||||
sections,
|
||||
symbols),
|
||||
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()),
|
||||
changeAttributes(List.of(), List.of(sections, symbols),
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -115,10 +107,9 @@ public class GdbModelTargetModule
|
|||
}
|
||||
|
||||
public void sectionsRefreshed() {
|
||||
AddressRange range = doGetRange();
|
||||
changeAttributes(List.of(), Map.of(
|
||||
RANGE_ATTRIBUTE_NAME, range,
|
||||
VISIBLE_RANGE_ATTRIBUTE_NAME, range),
|
||||
range = doGetRange();
|
||||
changeAttributes(List.of(),
|
||||
Map.of(RANGE_ATTRIBUTE_NAME, range, VISIBLE_RANGE_ATTRIBUTE_NAME, range),
|
||||
"Sections Refreshed");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue