1
0
Fork 0

WIP: comments for where to unify string order

string-order
Duncan Ogilvie 2023-03-02 08:03:30 +01:00
parent 73021964ae
commit d4b5ae8749
3 changed files with 4 additions and 3 deletions

View File

@ -286,8 +286,9 @@ void CPUDump::getColumnRichText(int col, dsint rva, RichTextPainter::List & rich
char string_text[MAX_STRING_SIZE] = "";
if(DbgGetLabelAt(data, SEG_DEFAULT, label_text))
curData.text = QString(modname) + "." + QString(label_text);
else if(DbgGetStringAt(data, string_text))
else if(DbgGetStringAt(data, string_text)) // TODO: change order
curData.text = string_text;
// TODO: write module.address as a fallback
if(!curData.text.length()) //stack comments
{
auto va = rvaToVa(rva);

View File

@ -1604,7 +1604,7 @@ QString RegistersView::getRegisterLabel(REGISTER_NAME register_selected)
duint register_value = (* ((duint*) registerValue(&wRegDumpStruct, register_selected)));
QString newText = QString("");
bool hasString = DbgGetStringAt(register_value, string_text);
bool hasString = DbgGetStringAt(register_value, string_text); // TODO: change order
bool hasLabel = DbgGetLabelAt(register_value, SEG_DEFAULT, label_text);
bool hasModule = DbgGetModuleAt(register_value, module_text);
bool hasStatusCode = register_selected == REGISTER_NAME::CAX && (register_value & ArchValue(0xF0000000, 0xFFFFFFFFF0000000)) == 0xC0000000;

View File

@ -131,7 +131,7 @@ QString getSymbolicNameStr(duint addr)
char labelText[MAX_LABEL_SIZE] = "";
char moduleText[MAX_MODULE_SIZE] = "";
char string[MAX_STRING_SIZE] = "";
bool bHasString = DbgGetStringAt(addr, string);
bool bHasString = DbgGetStringAt(addr, string); // TODO: change order
bool bHasLabel = DbgGetLabelAt(addr, SEG_DEFAULT, labelText);
bool bHasModule = (DbgGetModuleAt(addr, moduleText) && !QString(labelText).startsWith("JMP.&"));
QString addrText = DbgMemIsValidReadPtr(addr) ? ToPtrString(addr) : ToHexString(addr);