mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-619: dbgeng reports full image path, when possible.
This commit is contained in:
parent
01bd8b9ef0
commit
86caedef05
8 changed files with 59 additions and 12 deletions
|
@ -26,6 +26,8 @@ public interface DbgModule {
|
|||
|
||||
String getImageName();
|
||||
|
||||
String getModuleName();
|
||||
|
||||
Long getKnownBase();
|
||||
|
||||
Integer getSize();
|
||||
|
|
|
@ -72,6 +72,11 @@ public class DbgModuleImpl implements DbgModule {
|
|||
return info == null ? getName() : info.imageName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return info == null ? getName() : info.moduleName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getKnownBase() {
|
||||
return info == null ? 0L : info.baseOffset;
|
||||
|
|
|
@ -43,6 +43,11 @@ public interface DbgModelTargetModule extends //
|
|||
: nameAttr.getCachedAttribute(VALUE_ATTRIBUTE_NAME).toString();
|
||||
String sizestr =
|
||||
size == null ? "1" : size.getCachedAttribute(VALUE_ATTRIBUTE_NAME).toString();
|
||||
String shortnamestr = namestr;
|
||||
int sep = shortnamestr.lastIndexOf('\\');
|
||||
if (sep > 0 && sep < shortnamestr.length()) {
|
||||
shortnamestr = shortnamestr.substring(sep + 1);
|
||||
}
|
||||
Long base = Long.parseUnsignedLong(basestr, 16);
|
||||
Integer sz = Integer.parseInt(sizestr, 16);
|
||||
Address min = space.getAddress(base);
|
||||
|
@ -52,8 +57,9 @@ public interface DbgModelTargetModule extends //
|
|||
|
||||
String oldval = (String) getCachedAttribute(DISPLAY_ATTRIBUTE_NAME);
|
||||
map.put(MODULE_NAME_ATTRIBUTE_NAME, namestr);
|
||||
map.put(DISPLAY_ATTRIBUTE_NAME, namestr);
|
||||
setModified(map, !namestr.equals(oldval));
|
||||
map.put(SHORT_DISPLAY_ATTRIBUTE_NAME, shortnamestr);
|
||||
map.put(DISPLAY_ATTRIBUTE_NAME, shortnamestr);
|
||||
setModified(map, !shortnamestr.equals(oldval));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -65,7 +65,8 @@ public class DbgModelTargetModuleImpl extends DbgModelTargetObjectImpl
|
|||
// sections.getName(), sections, //
|
||||
), Map.of( //
|
||||
DISPLAY_ATTRIBUTE_NAME, getIndex(), //
|
||||
MODULE_NAME_ATTRIBUTE_NAME, module.getName(), //
|
||||
SHORT_DISPLAY_ATTRIBUTE_NAME, module.getName(), //
|
||||
MODULE_NAME_ATTRIBUTE_NAME, module.getImageName(), //
|
||||
"BaseAddress", space.getAddress(module.getKnownBase()), //
|
||||
"ImageName", module.getImageName(), //
|
||||
"TimeStamp", module.getTimeStamp(), //
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue