mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
Fix Cutter/Rizin API naming (#2755)
This commit is contained in:
parent
417a0a2221
commit
80e4269ca3
@ -686,13 +686,13 @@ bool CutterCore::mapFile(QString path, RVA mapaddr)
|
|||||||
|
|
||||||
void CutterCore::renameFunction(const RVA offset, const QString &newName)
|
void CutterCore::renameFunction(const RVA offset, const QString &newName)
|
||||||
{
|
{
|
||||||
cmdRaw("afn " + newName + " " + RAddressString(offset));
|
cmdRaw("afn " + newName + " " + RzAddressString(offset));
|
||||||
emit functionRenamed(offset, newName);
|
emit functionRenamed(offset, newName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CutterCore::delFunction(RVA addr)
|
void CutterCore::delFunction(RVA addr)
|
||||||
{
|
{
|
||||||
cmdRaw("af- " + RAddressString(addr));
|
cmdRaw("af- " + RzAddressString(addr));
|
||||||
emit functionsChanged();
|
emit functionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ void CutterCore::delFlag(const QString &name)
|
|||||||
|
|
||||||
QString CutterCore::getInstructionBytes(RVA addr)
|
QString CutterCore::getInstructionBytes(RVA addr)
|
||||||
{
|
{
|
||||||
return cmdj("aoj @ " + RAddressString(addr))
|
return cmdj("aoj @ " + RzAddressString(addr))
|
||||||
.array()
|
.array()
|
||||||
.first()
|
.first()
|
||||||
.toObject()[RJsonKey::bytes]
|
.toObject()[RJsonKey::bytes]
|
||||||
@ -737,7 +737,7 @@ QString CutterCore::getInstructionBytes(RVA addr)
|
|||||||
|
|
||||||
QString CutterCore::getInstructionOpcode(RVA addr)
|
QString CutterCore::getInstructionOpcode(RVA addr)
|
||||||
{
|
{
|
||||||
return cmdj("aoj @ " + RAddressString(addr))
|
return cmdj("aoj @ " + RzAddressString(addr))
|
||||||
.array()
|
.array()
|
||||||
.first()
|
.first()
|
||||||
.toObject()[RJsonKey::opcode]
|
.toObject()[RJsonKey::opcode]
|
||||||
@ -1364,7 +1364,7 @@ RefDescription CutterCore::formatRefDesc(QJsonObject refItem)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!refItem["value"].isNull()) {
|
if (!refItem["value"].isNull()) {
|
||||||
appendVar(desc.ref, RAddressString(refItem["value"].toVariant().toULongLong()), " ",
|
appendVar(desc.ref, RzAddressString(refItem["value"].toVariant().toULongLong()), " ",
|
||||||
"");
|
"");
|
||||||
}
|
}
|
||||||
refItem = refItem["ref"].toObject();
|
refItem = refItem["ref"].toObject();
|
||||||
@ -1579,7 +1579,7 @@ QVector<Chunk> CutterCore::getHeapChunks(RVA arena_addr)
|
|||||||
RzList *chunks = rz_heap_chunks_list(core, m_arena);
|
RzList *chunks = rz_heap_chunks_list(core, m_arena);
|
||||||
RzListIter *iter;
|
RzListIter *iter;
|
||||||
RzHeapChunkListItem *data;
|
RzHeapChunkListItem *data;
|
||||||
CutterRListForeach(chunks, iter, RzHeapChunkListItem, data)
|
CutterRzListForeach(chunks, iter, RzHeapChunkListItem, data)
|
||||||
{
|
{
|
||||||
Chunk chunk;
|
Chunk chunk;
|
||||||
chunk.offset = data->addr;
|
chunk.offset = data->addr;
|
||||||
@ -1607,7 +1607,7 @@ QVector<Arena> CutterCore::getArenas()
|
|||||||
RzList *arenas = rz_heap_arenas_list(core);
|
RzList *arenas = rz_heap_arenas_list(core);
|
||||||
RzListIter *iter;
|
RzListIter *iter;
|
||||||
RzArenaListItem *data;
|
RzArenaListItem *data;
|
||||||
CutterRListForeach(arenas, iter, RzArenaListItem, data)
|
CutterRzListForeach(arenas, iter, RzArenaListItem, data)
|
||||||
{
|
{
|
||||||
Arena arena;
|
Arena arena;
|
||||||
arena.offset = data->addr;
|
arena.offset = data->addr;
|
||||||
@ -1669,7 +1669,7 @@ QVector<RzHeapBin *> CutterCore::getHeapBins(ut64 arena_addr)
|
|||||||
RzList *tcache_bins = rz_heap_tcache_content(core, arena_addr);
|
RzList *tcache_bins = rz_heap_tcache_content(core, arena_addr);
|
||||||
RzListIter *iter;
|
RzListIter *iter;
|
||||||
RzHeapBin *bin;
|
RzHeapBin *bin;
|
||||||
CutterRListForeach(tcache_bins, iter, RzHeapBin, bin)
|
CutterRzListForeach(tcache_bins, iter, RzHeapBin, bin)
|
||||||
{
|
{
|
||||||
if (!bin) {
|
if (!bin) {
|
||||||
continue;
|
continue;
|
||||||
@ -2458,7 +2458,7 @@ void CutterCore::updateBreakpoint(int index, const BreakpointDescription &config
|
|||||||
|
|
||||||
void CutterCore::delBreakpoint(RVA addr)
|
void CutterCore::delBreakpoint(RVA addr)
|
||||||
{
|
{
|
||||||
cmdRaw("db- " + RAddressString(addr));
|
cmdRaw("db- " + RzAddressString(addr));
|
||||||
emit breakpointsChanged(addr);
|
emit breakpointsChanged(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2470,13 +2470,13 @@ void CutterCore::delAllBreakpoints()
|
|||||||
|
|
||||||
void CutterCore::enableBreakpoint(RVA addr)
|
void CutterCore::enableBreakpoint(RVA addr)
|
||||||
{
|
{
|
||||||
cmdRaw("dbe " + RAddressString(addr));
|
cmdRaw("dbe " + RzAddressString(addr));
|
||||||
emit breakpointsChanged(addr);
|
emit breakpointsChanged(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CutterCore::disableBreakpoint(RVA addr)
|
void CutterCore::disableBreakpoint(RVA addr)
|
||||||
{
|
{
|
||||||
cmdRaw("dbd " + RAddressString(addr));
|
cmdRaw("dbd " + RzAddressString(addr));
|
||||||
emit breakpointsChanged(addr);
|
emit breakpointsChanged(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2685,7 +2685,7 @@ QList<RVA> CutterCore::getSeekHistory()
|
|||||||
RzListIter *it;
|
RzListIter *it;
|
||||||
RzCoreSeekItem *undo;
|
RzCoreSeekItem *undo;
|
||||||
RzList *list = rz_core_seek_list(core);
|
RzList *list = rz_core_seek_list(core);
|
||||||
CutterRListForeach(list, it, RzCoreSeekItem, undo) { ret << undo->offset; }
|
CutterRzListForeach(list, it, RzCoreSeekItem, undo) { ret << undo->offset; }
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2697,7 +2697,7 @@ QStringList CutterCore::getAsmPluginNames()
|
|||||||
QStringList ret;
|
QStringList ret;
|
||||||
|
|
||||||
RzAsmPlugin *ap;
|
RzAsmPlugin *ap;
|
||||||
CutterRListForeach(core->rasm->plugins, it, RzAsmPlugin, ap) { ret << ap->name; }
|
CutterRzListForeach(core->rasm->plugins, it, RzAsmPlugin, ap) { ret << ap->name; }
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2709,7 +2709,7 @@ QStringList CutterCore::getAnalPluginNames()
|
|||||||
QStringList ret;
|
QStringList ret;
|
||||||
|
|
||||||
RzAnalysisPlugin *ap;
|
RzAnalysisPlugin *ap;
|
||||||
CutterRListForeach(core->analysis->plugins, it, RzAnalysisPlugin, ap) { ret << ap->name; }
|
CutterRzListForeach(core->analysis->plugins, it, RzAnalysisPlugin, ap) { ret << ap->name; }
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2792,7 +2792,7 @@ QList<RzAsmPluginDescription> CutterCore::getRAsmPluginDescriptions()
|
|||||||
QList<RzAsmPluginDescription> ret;
|
QList<RzAsmPluginDescription> ret;
|
||||||
|
|
||||||
RzAsmPlugin *ap;
|
RzAsmPlugin *ap;
|
||||||
CutterRListForeach(core->rasm->plugins, it, RzAsmPlugin, ap)
|
CutterRzListForeach(core->rasm->plugins, it, RzAsmPlugin, ap)
|
||||||
{
|
{
|
||||||
RzAsmPluginDescription plugin;
|
RzAsmPluginDescription plugin;
|
||||||
|
|
||||||
@ -2819,7 +2819,7 @@ QList<FunctionDescription> CutterCore::getAllFunctions()
|
|||||||
|
|
||||||
RzListIter *iter;
|
RzListIter *iter;
|
||||||
RzAnalysisFunction *fcn;
|
RzAnalysisFunction *fcn;
|
||||||
CutterRListForeach(core->analysis->fcns, iter, RzAnalysisFunction, fcn)
|
CutterRzListForeach(core->analysis->fcns, iter, RzAnalysisFunction, fcn)
|
||||||
{
|
{
|
||||||
FunctionDescription function;
|
FunctionDescription function;
|
||||||
function.offset = fcn->addr;
|
function.offset = fcn->addr;
|
||||||
@ -2900,7 +2900,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
|
|||||||
|
|
||||||
RzBinSymbol *bs;
|
RzBinSymbol *bs;
|
||||||
if (core && core->bin && core->bin->cur && core->bin->cur->o) {
|
if (core && core->bin && core->bin->cur && core->bin->cur->o) {
|
||||||
CutterRListForeach(core->bin->cur->o->symbols, it, RzBinSymbol, bs)
|
CutterRzListForeach(core->bin->cur->o->symbols, it, RzBinSymbol, bs)
|
||||||
{
|
{
|
||||||
QString type = QString(bs->bind) + " " + QString(bs->type);
|
QString type = QString(bs->bind) + " " + QString(bs->type);
|
||||||
SymbolDescription symbol;
|
SymbolDescription symbol;
|
||||||
@ -2914,7 +2914,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
|
|||||||
/* list entrypoints as symbols too */
|
/* list entrypoints as symbols too */
|
||||||
int n = 0;
|
int n = 0;
|
||||||
RzBinAddr *entry;
|
RzBinAddr *entry;
|
||||||
CutterRListForeach(core->bin->cur->o->entries, it, RzBinAddr, entry)
|
CutterRzListForeach(core->bin->cur->o->entries, it, RzBinAddr, entry)
|
||||||
{
|
{
|
||||||
SymbolDescription symbol;
|
SymbolDescription symbol;
|
||||||
symbol.vaddr = entry->vaddr;
|
symbol.vaddr = entry->vaddr;
|
||||||
@ -3335,7 +3335,7 @@ QList<AnalMethodDescription> CutterCore::getAnalClassMethods(const QString &cls)
|
|||||||
|
|
||||||
ret.reserve(static_cast<int>(meths->len));
|
ret.reserve(static_cast<int>(meths->len));
|
||||||
RzAnalysisMethod *meth;
|
RzAnalysisMethod *meth;
|
||||||
CutterRVectorForeach(meths, meth, RzAnalysisMethod)
|
CutterRzVectorForeach(meths, meth, RzAnalysisMethod)
|
||||||
{
|
{
|
||||||
AnalMethodDescription desc;
|
AnalMethodDescription desc;
|
||||||
desc.name = QString::fromUtf8(meth->name);
|
desc.name = QString::fromUtf8(meth->name);
|
||||||
@ -3360,7 +3360,7 @@ QList<AnalBaseClassDescription> CutterCore::getAnalClassBaseClasses(const QStrin
|
|||||||
|
|
||||||
ret.reserve(static_cast<int>(bases->len));
|
ret.reserve(static_cast<int>(bases->len));
|
||||||
RzAnalysisBaseClass *base;
|
RzAnalysisBaseClass *base;
|
||||||
CutterRVectorForeach(bases, base, RzAnalysisBaseClass)
|
CutterRzVectorForeach(bases, base, RzAnalysisBaseClass)
|
||||||
{
|
{
|
||||||
AnalBaseClassDescription desc;
|
AnalBaseClassDescription desc;
|
||||||
desc.id = QString::fromUtf8(base->id);
|
desc.id = QString::fromUtf8(base->id);
|
||||||
@ -3385,7 +3385,7 @@ QList<AnalVTableDescription> CutterCore::getAnalClassVTables(const QString &cls)
|
|||||||
|
|
||||||
acVtables.reserve(static_cast<int>(vtables->len));
|
acVtables.reserve(static_cast<int>(vtables->len));
|
||||||
RzAnalysisVTable *vtable;
|
RzAnalysisVTable *vtable;
|
||||||
CutterRVectorForeach(vtables, vtable, RzAnalysisVTable)
|
CutterRzVectorForeach(vtables, vtable, RzAnalysisVTable)
|
||||||
{
|
{
|
||||||
AnalVTableDescription desc;
|
AnalVTableDescription desc;
|
||||||
desc.id = QString::fromUtf8(vtable->id);
|
desc.id = QString::fromUtf8(vtable->id);
|
||||||
@ -3528,7 +3528,7 @@ QList<TypeDescription> CutterCore::getBaseType(RzBaseTypeKind kind, const char *
|
|||||||
RzBaseType *type;
|
RzBaseType *type;
|
||||||
RzListIter *iter;
|
RzListIter *iter;
|
||||||
|
|
||||||
CutterRListForeach (ts, iter, RzBaseType, type) {
|
CutterRzListForeach (ts, iter, RzBaseType, type) {
|
||||||
TypeDescription exp;
|
TypeDescription exp;
|
||||||
|
|
||||||
exp.type = type->name;
|
exp.type = type->name;
|
||||||
@ -3739,9 +3739,9 @@ QList<XrefDescription> CutterCore::getXRefsForVariable(QString variableName, boo
|
|||||||
xref.from = addr;
|
xref.from = addr;
|
||||||
xref.to = addr;
|
xref.to = addr;
|
||||||
if (findWrites) {
|
if (findWrites) {
|
||||||
xref.from_str = RAddressString(addr);
|
xref.from_str = RzAddressString(addr);
|
||||||
} else {
|
} else {
|
||||||
xref.to_str = RAddressString(addr);
|
xref.to_str = RzAddressString(addr);
|
||||||
}
|
}
|
||||||
xrefList << xref;
|
xrefList << xref;
|
||||||
}
|
}
|
||||||
@ -3775,14 +3775,14 @@ QList<XrefDescription> CutterCore::getXRefs(RVA addr, bool to, bool whole_functi
|
|||||||
|
|
||||||
xref.from = xrefObject[RJsonKey::from].toVariant().toULongLong();
|
xref.from = xrefObject[RJsonKey::from].toVariant().toULongLong();
|
||||||
if (!to) {
|
if (!to) {
|
||||||
xref.from_str = RAddressString(xref.from);
|
xref.from_str = RzAddressString(xref.from);
|
||||||
} else {
|
} else {
|
||||||
QString fcn = xrefObject[RJsonKey::fcn_name].toString();
|
QString fcn = xrefObject[RJsonKey::fcn_name].toString();
|
||||||
if (!fcn.isEmpty()) {
|
if (!fcn.isEmpty()) {
|
||||||
RVA fcnAddr = xrefObject[RJsonKey::fcn_addr].toVariant().toULongLong();
|
RVA fcnAddr = xrefObject[RJsonKey::fcn_addr].toVariant().toULongLong();
|
||||||
xref.from_str = fcn + " + 0x" + QString::number(xref.from - fcnAddr, 16);
|
xref.from_str = fcn + " + 0x" + QString::number(xref.from - fcnAddr, 16);
|
||||||
} else {
|
} else {
|
||||||
xref.from_str = RAddressString(xref.from);
|
xref.from_str = RzAddressString(xref.from);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
// Rizin list iteration macros
|
// Rizin list iteration macros
|
||||||
#define CutterRListForeach(list, it, type, x) \
|
#define CutterRzListForeach(list, it, type, x) \
|
||||||
if (list) \
|
if (list) \
|
||||||
for (it = list->head; it && ((x = static_cast<type *>(it->data))); it = it->n)
|
for (it = list->head; it && ((x = static_cast<type *>(it->data))); it = it->n)
|
||||||
|
|
||||||
#define CutterRVectorForeach(vec, it, type) \
|
#define CutterRzVectorForeach(vec, it, type) \
|
||||||
if ((vec) && (vec)->a) \
|
if ((vec) && (vec)->a) \
|
||||||
for (it = (type *)(vec)->a; \
|
for (it = (type *)(vec)->a; \
|
||||||
(char *)it != (char *)(vec)->a + ((vec)->len * (vec)->elem_size); \
|
(char *)it != (char *)(vec)->a + ((vec)->len * (vec)->elem_size); \
|
||||||
@ -44,17 +44,17 @@ typedef ut64 RVA;
|
|||||||
*/
|
*/
|
||||||
#define RVA_INVALID RVA_MAX
|
#define RVA_INVALID RVA_MAX
|
||||||
|
|
||||||
inline QString RAddressString(RVA addr)
|
inline QString RzAddressString(RVA addr)
|
||||||
{
|
{
|
||||||
return QString::asprintf("%#010llx", addr);
|
return QString::asprintf("%#010llx", addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QString RSizeString(RVA size)
|
inline QString RzSizeString(RVA size)
|
||||||
{
|
{
|
||||||
return QString::asprintf("%#llx", size);
|
return QString::asprintf("%#llx", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline QString RHexString(RVA size)
|
inline QString RzHexString(RVA size)
|
||||||
{
|
{
|
||||||
return QString::asprintf("%#llx", size);
|
return QString::asprintf("%#llx", size);
|
||||||
}
|
}
|
||||||
|
@ -619,7 +619,7 @@ bool MainWindow::openProject(const QString &file)
|
|||||||
const char *s = rz_project_err_message(err);
|
const char *s = rz_project_err_message(err);
|
||||||
QString msg = tr("Failed to open project: %1").arg(QString::fromUtf8(s));
|
QString msg = tr("Failed to open project: %1").arg(QString::fromUtf8(s));
|
||||||
RzListIter *it;
|
RzListIter *it;
|
||||||
CutterRListForeach(res, it, const char, s) { msg += "\n" + QString::fromUtf8(s); }
|
CutterRzListForeach(res, it, const char, s) { msg += "\n" + QString::fromUtf8(s); }
|
||||||
QMessageBox::critical(this, tr("Open Project"), msg);
|
QMessageBox::critical(this, tr("Open Project"), msg);
|
||||||
rz_list_free(res);
|
rz_list_free(res);
|
||||||
return false;
|
return false;
|
||||||
@ -1134,7 +1134,7 @@ void MainWindow::updateHistoryMenu(QMenu *menu, bool redo)
|
|||||||
|
|
||||||
bool history = true;
|
bool history = true;
|
||||||
QList<QAction *> actions;
|
QList<QAction *> actions;
|
||||||
CutterRListForeach(list, it, RzCoreSeekItem, undo) {
|
CutterRzListForeach(list, it, RzCoreSeekItem, undo) {
|
||||||
RzFlagItem *f = rz_flag_get_at(core->flags, undo->offset, true);
|
RzFlagItem *f = rz_flag_get_at(core->flags, undo->offset, true);
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
if (f) {
|
if (f) {
|
||||||
@ -1151,7 +1151,7 @@ void MainWindow::updateHistoryMenu(QMenu *menu, bool redo)
|
|||||||
history = false;
|
history = false;
|
||||||
}
|
}
|
||||||
if (history != redo || current) { // Include current in both directions
|
if (history != redo || current) { // Include current in both directions
|
||||||
QString addressString = RAddressString(offset);
|
QString addressString = RzAddressString(offset);
|
||||||
|
|
||||||
QString toolTip =
|
QString toolTip =
|
||||||
QString("%1 %2").arg(addressString, name); // show non truncated name in tooltip
|
QString("%1 %2").arg(addressString, name); // show non truncated name in tooltip
|
||||||
|
@ -5,18 +5,18 @@ ArenaInfoDialog::ArenaInfoDialog(Arena &arena, QWidget *parent)
|
|||||||
: arena(arena), QDialog(parent), ui(new Ui::ArenaInfoDialog)
|
: arena(arena), QDialog(parent), ui(new Ui::ArenaInfoDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle("Arena @ " + RAddressString(arena.offset));
|
setWindowTitle("Arena @ " + RzAddressString(arena.offset));
|
||||||
updateContents();
|
updateContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArenaInfoDialog::updateContents()
|
void ArenaInfoDialog::updateContents()
|
||||||
{
|
{
|
||||||
ui->lineEditTop->setText(RAddressString(arena.top));
|
ui->lineEditTop->setText(RzAddressString(arena.top));
|
||||||
ui->lineEditLastRem->setText(RAddressString(arena.last_remainder));
|
ui->lineEditLastRem->setText(RzAddressString(arena.last_remainder));
|
||||||
ui->lineEditNext->setText(RAddressString(arena.next));
|
ui->lineEditNext->setText(RzAddressString(arena.next));
|
||||||
ui->lineEditNextfree->setText(RAddressString(arena.next_free));
|
ui->lineEditNextfree->setText(RzAddressString(arena.next_free));
|
||||||
ui->lineEditSysMem->setText(RAddressString(arena.system_mem));
|
ui->lineEditSysMem->setText(RzAddressString(arena.system_mem));
|
||||||
ui->lineEditMaxMem->setText(RAddressString(arena.max_system_mem));
|
ui->lineEditMaxMem->setText(RzAddressString(arena.max_system_mem));
|
||||||
}
|
}
|
||||||
|
|
||||||
ArenaInfoDialog::~ArenaInfoDialog()
|
ArenaInfoDialog::~ArenaInfoDialog()
|
||||||
|
@ -67,7 +67,7 @@ BreakpointsDialog::BreakpointsDialog(const BreakpointDescription &breakpoint, QW
|
|||||||
{
|
{
|
||||||
switch (breakpoint.type) {
|
switch (breakpoint.type) {
|
||||||
case BreakpointDescription::Address:
|
case BreakpointDescription::Address:
|
||||||
ui->breakpointPosition->setText(RAddressString(breakpoint.addr));
|
ui->breakpointPosition->setText(RzAddressString(breakpoint.addr));
|
||||||
break;
|
break;
|
||||||
case BreakpointDescription::Named:
|
case BreakpointDescription::Named:
|
||||||
ui->breakpointPosition->setText(breakpoint.positionExpression);
|
ui->breakpointPosition->setText(breakpoint.positionExpression);
|
||||||
@ -102,7 +102,7 @@ BreakpointsDialog::BreakpointsDialog(RVA address, QWidget *parent)
|
|||||||
: BreakpointsDialog(false, parent)
|
: BreakpointsDialog(false, parent)
|
||||||
{
|
{
|
||||||
if (address != RVA_INVALID) {
|
if (address != RVA_INVALID) {
|
||||||
ui->breakpointPosition->setText(RAddressString(address));
|
ui->breakpointPosition->setText(RzAddressString(address));
|
||||||
}
|
}
|
||||||
refreshOkButton();
|
refreshOkButton();
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,9 @@ void CommentsDialog::addOrEditComment(RVA offset, QWidget *parent)
|
|||||||
CommentsDialog c(parent);
|
CommentsDialog c(parent);
|
||||||
|
|
||||||
if (oldComment.isNull() || oldComment.isEmpty()) {
|
if (oldComment.isNull() || oldComment.isEmpty()) {
|
||||||
c.setWindowTitle(tr("Add Comment at %1").arg(RAddressString(offset)));
|
c.setWindowTitle(tr("Add Comment at %1").arg(RzAddressString(offset)));
|
||||||
} else {
|
} else {
|
||||||
c.setWindowTitle(tr("Edit Comment at %1").arg(RAddressString(offset)));
|
c.setWindowTitle(tr("Edit Comment at %1").arg(RzAddressString(offset)));
|
||||||
}
|
}
|
||||||
|
|
||||||
c.setComment(oldComment);
|
c.setComment(oldComment);
|
||||||
|
@ -89,7 +89,7 @@ void EditMethodDialog::setClass(const QString &className)
|
|||||||
void EditMethodDialog::setMethod(const AnalMethodDescription &desc)
|
void EditMethodDialog::setMethod(const AnalMethodDescription &desc)
|
||||||
{
|
{
|
||||||
ui->nameEdit->setText(desc.name);
|
ui->nameEdit->setText(desc.name);
|
||||||
ui->addressEdit->setText(desc.addr != RVA_INVALID ? RAddressString(desc.addr) : nullptr);
|
ui->addressEdit->setText(desc.addr != RVA_INVALID ? RzAddressString(desc.addr) : nullptr);
|
||||||
|
|
||||||
if (desc.vtableOffset >= 0) {
|
if (desc.vtableOffset >= 0) {
|
||||||
ui->virtualCheckBox->setChecked(true);
|
ui->virtualCheckBox->setChecked(true);
|
||||||
|
@ -21,9 +21,9 @@ FlagDialog::FlagDialog(RVA offset, QWidget *parent)
|
|||||||
ui->sizeEdit->setValidator(size_validator);
|
ui->sizeEdit->setValidator(size_validator);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
ui->nameEdit->setText(flag->name);
|
ui->nameEdit->setText(flag->name);
|
||||||
ui->labelAction->setText(tr("Edit flag at %1").arg(RAddressString(offset)));
|
ui->labelAction->setText(tr("Edit flag at %1").arg(RzAddressString(offset)));
|
||||||
} else {
|
} else {
|
||||||
ui->labelAction->setText(tr("Add flag at %1").arg(RAddressString(offset)));
|
ui->labelAction->setText(tr("Add flag at %1").arg(RzAddressString(offset)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connect slots
|
// Connect slots
|
||||||
|
@ -25,7 +25,7 @@ GlibcHeapBinsDialog::GlibcHeapBinsDialog(RVA m_state, MainWindow *main, QWidget
|
|||||||
binsModel->reload();
|
binsModel->reload();
|
||||||
ui->viewBins->resizeColumnsToContents();
|
ui->viewBins->resizeColumnsToContents();
|
||||||
graphView = nullptr;
|
graphView = nullptr;
|
||||||
this->setWindowTitle(tr("Bins info for arena @ ") + RAddressString(m_state));
|
this->setWindowTitle(tr("Bins info for arena @ ") + RzAddressString(m_state));
|
||||||
}
|
}
|
||||||
|
|
||||||
GlibcHeapBinsDialog::~GlibcHeapBinsDialog()
|
GlibcHeapBinsDialog::~GlibcHeapBinsDialog()
|
||||||
@ -49,9 +49,9 @@ void GlibcHeapBinsDialog::setChainInfo(int index)
|
|||||||
RzHeapChunkListItem *item;
|
RzHeapChunkListItem *item;
|
||||||
RzList *chunks = binsModel->getChunks(index);
|
RzList *chunks = binsModel->getChunks(index);
|
||||||
QString chainInfo;
|
QString chainInfo;
|
||||||
CutterRListForeach(chunks, iter, RzHeapChunkListItem, item)
|
CutterRzListForeach(chunks, iter, RzHeapChunkListItem, item)
|
||||||
{
|
{
|
||||||
chainInfo += " → " + RAddressString(item->addr);
|
chainInfo += " → " + RzAddressString(item->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add bin message at the end of the list
|
// Add bin message at the end of the list
|
||||||
@ -127,15 +127,15 @@ QVariant BinsModel::data(const QModelIndex &index, int role) const
|
|||||||
case BinNumColumn:
|
case BinNumColumn:
|
||||||
return item->bin_num;
|
return item->bin_num;
|
||||||
case FdColumn:
|
case FdColumn:
|
||||||
return (item->fd == 0) ? tr("N/A") : RAddressString(item->fd);
|
return (item->fd == 0) ? tr("N/A") : RzAddressString(item->fd);
|
||||||
case BkColumn:
|
case BkColumn:
|
||||||
return (item->bk == 0) ? tr("N/A") : RAddressString(item->bk);
|
return (item->bk == 0) ? tr("N/A") : RzAddressString(item->bk);
|
||||||
case TypeColumn:
|
case TypeColumn:
|
||||||
return tr(item->type);
|
return tr(item->type);
|
||||||
case CountColumn:
|
case CountColumn:
|
||||||
return rz_list_length(item->chunks);
|
return rz_list_length(item->chunks);
|
||||||
case SizeColumn:
|
case SizeColumn:
|
||||||
return (item->size == 0) ? tr("N/A") : RHexString(item->size);
|
return (item->size == 0) ? tr("N/A") : RzHexString(item->size);
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ GlibcHeapInfoDialog::GlibcHeapInfoDialog(RVA offset, QString status, QWidget *pa
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// set window title
|
// set window title
|
||||||
QString windowTitle = tr("Chunk @ ") + RAddressString(offset);
|
QString windowTitle = tr("Chunk @ ") + RzAddressString(offset);
|
||||||
if (!this->status.isEmpty()) {
|
if (!this->status.isEmpty()) {
|
||||||
windowTitle += QString("(" + this->status + ")");
|
windowTitle += QString("(" + this->status + ")");
|
||||||
}
|
}
|
||||||
@ -34,13 +34,13 @@ void GlibcHeapInfoDialog::updateFields()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the information in the widget
|
// Update the information in the widget
|
||||||
this->ui->baseEdit->setText(RAddressString(offset));
|
this->ui->baseEdit->setText(RzAddressString(offset));
|
||||||
this->ui->sizeEdit->setText(RHexString(chunk->size));
|
this->ui->sizeEdit->setText(RzHexString(chunk->size));
|
||||||
this->ui->bkEdit->setText(RAddressString(chunk->bk));
|
this->ui->bkEdit->setText(RzAddressString(chunk->bk));
|
||||||
this->ui->fdEdit->setText(RAddressString(chunk->fd));
|
this->ui->fdEdit->setText(RzAddressString(chunk->fd));
|
||||||
this->ui->bknsEdit->setText(RAddressString(chunk->bk_nextsize));
|
this->ui->bknsEdit->setText(RzAddressString(chunk->bk_nextsize));
|
||||||
this->ui->fdnsEdit->setText(RAddressString(chunk->fd_nextsize));
|
this->ui->fdnsEdit->setText(RzAddressString(chunk->fd_nextsize));
|
||||||
this->ui->prevSizeEdit->setText(RHexString(chunk->prev_size));
|
this->ui->prevSizeEdit->setText(RzHexString(chunk->prev_size));
|
||||||
if (chunk->is_mmapped) {
|
if (chunk->is_mmapped) {
|
||||||
this->ui->rbIM->setChecked(true);
|
this->ui->rbIM->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -176,7 +176,7 @@ void InitialOptionsDialog::loadOptions(const InitialOptions &options)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (options.binLoadAddr != RVA_INVALID) {
|
if (options.binLoadAddr != RVA_INVALID) {
|
||||||
ui->entry_loadOffset->setText(RAddressString(options.binLoadAddr));
|
ui->entry_loadOffset->setText(RzAddressString(options.binLoadAddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->writeCheckBox->setChecked(options.writeEnabled);
|
ui->writeCheckBox->setChecked(options.writeEnabled);
|
||||||
|
@ -100,7 +100,7 @@ void LinkTypeDialog::on_exprLineEdit_textChanged(const QString &text)
|
|||||||
{
|
{
|
||||||
RVA addr = Core()->math(text);
|
RVA addr = Core()->math(text);
|
||||||
if (Core()->isAddressMapped(addr)) {
|
if (Core()->isAddressMapped(addr)) {
|
||||||
ui->addressLineEdit->setText(RAddressString(addr));
|
ui->addressLineEdit->setText(RzAddressString(addr));
|
||||||
addrValid = true;
|
addrValid = true;
|
||||||
} else {
|
} else {
|
||||||
ui->addressLineEdit->setText(tr("Invalid Address"));
|
ui->addressLineEdit->setText(tr("Invalid Address"));
|
||||||
|
@ -10,7 +10,7 @@ SetToDataDialog::SetToDataDialog(RVA startAddr, QWidget *parent)
|
|||||||
validator->setBottom(1);
|
validator->setBottom(1);
|
||||||
ui->sizeEdit->setValidator(validator);
|
ui->sizeEdit->setValidator(validator);
|
||||||
ui->repeatEdit->setValidator(validator);
|
ui->repeatEdit->setValidator(validator);
|
||||||
ui->startAddrLabel->setText(RAddressString(startAddr));
|
ui->startAddrLabel->setText(RzAddressString(startAddr));
|
||||||
updateEndAddress();
|
updateEndAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ int SetToDataDialog::getItemCount()
|
|||||||
void SetToDataDialog::updateEndAddress()
|
void SetToDataDialog::updateEndAddress()
|
||||||
{
|
{
|
||||||
RVA endAddr = startAddress + (getItemSize() * getItemCount());
|
RVA endAddr = startAddress + (getItemSize() * getItemCount());
|
||||||
ui->endAddrLabel->setText(RAddressString(endAddr));
|
ui->endAddrLabel->setText(RzAddressString(endAddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetToDataDialog::on_sizeEdit_textChanged(const QString &arg1)
|
void SetToDataDialog::on_sizeEdit_textChanged(const QString &arg1)
|
||||||
|
@ -43,12 +43,12 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
|
|
||||||
QTreeWidgetItem *addrItemL = new QTreeWidgetItem();
|
QTreeWidgetItem *addrItemL = new QTreeWidgetItem();
|
||||||
addrItemL->setText(0, "Address:");
|
addrItemL->setText(0, "Address:");
|
||||||
addrItemL->setText(1, RAddressString(versym["address"].toDouble()));
|
addrItemL->setText(1, RzAddressString(versym["address"].toDouble()));
|
||||||
ui->leftTreeWidget->addTopLevelItem(addrItemL);
|
ui->leftTreeWidget->addTopLevelItem(addrItemL);
|
||||||
|
|
||||||
QTreeWidgetItem *offItemL = new QTreeWidgetItem();
|
QTreeWidgetItem *offItemL = new QTreeWidgetItem();
|
||||||
offItemL->setText(0, "Offset:");
|
offItemL->setText(0, "Offset:");
|
||||||
offItemL->setText(1, RAddressString(versym["offset"].toDouble()));
|
offItemL->setText(1, RzAddressString(versym["offset"].toDouble()));
|
||||||
ui->leftTreeWidget->addTopLevelItem(offItemL);
|
ui->leftTreeWidget->addTopLevelItem(offItemL);
|
||||||
|
|
||||||
QTreeWidgetItem *linkItemL = new QTreeWidgetItem();
|
QTreeWidgetItem *linkItemL = new QTreeWidgetItem();
|
||||||
@ -66,7 +66,7 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
for (QJsonValue val : versym["entries"].toArray()) {
|
for (QJsonValue val : versym["entries"].toArray()) {
|
||||||
QJsonObject obj = val.toObject();
|
QJsonObject obj = val.toObject();
|
||||||
QTreeWidgetItem *tempItem = new QTreeWidgetItem();
|
QTreeWidgetItem *tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, RAddressString(obj["idx"].toDouble()));
|
tempItem->setText(0, RzAddressString(obj["idx"].toDouble()));
|
||||||
tempItem->setText(1, obj["value"].toString());
|
tempItem->setText(1, obj["value"].toString());
|
||||||
entriesItemL->addChild(tempItem);
|
entriesItemL->addChild(tempItem);
|
||||||
}
|
}
|
||||||
@ -83,12 +83,12 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
|
|
||||||
QTreeWidgetItem *addrItemR = new QTreeWidgetItem();
|
QTreeWidgetItem *addrItemR = new QTreeWidgetItem();
|
||||||
addrItemR->setText(0, "Address:");
|
addrItemR->setText(0, "Address:");
|
||||||
addrItemR->setText(1, RAddressString(verneed["address"].toDouble()));
|
addrItemR->setText(1, RzAddressString(verneed["address"].toDouble()));
|
||||||
ui->rightTreeWidget->addTopLevelItem(addrItemR);
|
ui->rightTreeWidget->addTopLevelItem(addrItemR);
|
||||||
|
|
||||||
QTreeWidgetItem *offItemR = new QTreeWidgetItem();
|
QTreeWidgetItem *offItemR = new QTreeWidgetItem();
|
||||||
offItemR->setText(0, "Offset:");
|
offItemR->setText(0, "Offset:");
|
||||||
offItemR->setText(1, RAddressString(verneed["offset"].toDouble()));
|
offItemR->setText(1, RzAddressString(verneed["offset"].toDouble()));
|
||||||
ui->rightTreeWidget->addTopLevelItem(offItemR);
|
ui->rightTreeWidget->addTopLevelItem(offItemR);
|
||||||
|
|
||||||
QTreeWidgetItem *linkItemR = new QTreeWidgetItem();
|
QTreeWidgetItem *linkItemR = new QTreeWidgetItem();
|
||||||
@ -107,7 +107,7 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
QJsonObject parentObj = parentVal.toObject();
|
QJsonObject parentObj = parentVal.toObject();
|
||||||
QTreeWidgetItem *parentItem = new QTreeWidgetItem();
|
QTreeWidgetItem *parentItem = new QTreeWidgetItem();
|
||||||
QString parentString;
|
QString parentString;
|
||||||
parentItem->setText(0, RAddressString(parentObj["idx"].toDouble()));
|
parentItem->setText(0, RzAddressString(parentObj["idx"].toDouble()));
|
||||||
parentString.append("Version: " + QString::number(parentObj["vn_version"].toDouble())
|
parentString.append("Version: " + QString::number(parentObj["vn_version"].toDouble())
|
||||||
+ "\t");
|
+ "\t");
|
||||||
parentString.append("File: " + parentObj["file_name"].toString());
|
parentString.append("File: " + parentObj["file_name"].toString());
|
||||||
@ -117,7 +117,7 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
QJsonObject childObj = childVal.toObject();
|
QJsonObject childObj = childVal.toObject();
|
||||||
QTreeWidgetItem *childItem = new QTreeWidgetItem();
|
QTreeWidgetItem *childItem = new QTreeWidgetItem();
|
||||||
QString childString;
|
QString childString;
|
||||||
childItem->setText(0, RAddressString(childObj["idx"].toDouble()));
|
childItem->setText(0, RzAddressString(childObj["idx"].toDouble()));
|
||||||
childString.append("Name: " + childObj["name"].toString() + "\t");
|
childString.append("Name: " + childObj["name"].toString() + "\t");
|
||||||
childString.append("Flags: " + childObj["flags"].toString() + "\t");
|
childString.append("Flags: " + childObj["flags"].toString() + "\t");
|
||||||
childString.append("Version: " + QString::number(childObj["version"].toDouble()));
|
childString.append("Version: " + QString::number(childObj["version"].toDouble()));
|
||||||
@ -147,7 +147,7 @@ void VersionInfoDialog::fillVersionInfo()
|
|||||||
QTreeWidgetItem *tempItem = new QTreeWidgetItem();
|
QTreeWidgetItem *tempItem = new QTreeWidgetItem();
|
||||||
tempItem->setText(0, key);
|
tempItem->setText(0, key);
|
||||||
if (vs[key].isDouble())
|
if (vs[key].isDouble())
|
||||||
tempItem->setText(1, RHexString(vs[key].toDouble()));
|
tempItem->setText(1, RzHexString(vs[key].toDouble()));
|
||||||
else
|
else
|
||||||
tempItem->setText(1, vs[key].toString());
|
tempItem->setText(1, vs[key].toString());
|
||||||
ui->leftTreeWidget->addTopLevelItem(tempItem);
|
ui->leftTreeWidget->addTopLevelItem(tempItem);
|
||||||
|
@ -136,7 +136,7 @@ void XrefsDialog::updatePreview(RVA addr)
|
|||||||
ui->previewTextEdit->document()->setHtml(disas);
|
ui->previewTextEdit->document()->setHtml(disas);
|
||||||
|
|
||||||
// Does it make any sense?
|
// Does it make any sense?
|
||||||
ui->previewTextEdit->find(normalizeAddr(RAddressString(addr)), QTextDocument::FindBackward);
|
ui->previewTextEdit->find(normalizeAddr(RzAddressString(addr)), QTextDocument::FindBackward);
|
||||||
ui->previewTextEdit->moveCursor(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
|
ui->previewTextEdit->moveCursor(QTextCursor::StartOfLine, QTextCursor::MoveAnchor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void AddressableItemContextMenu::clearTarget()
|
|||||||
void AddressableItemContextMenu::onActionCopyAddress()
|
void AddressableItemContextMenu::onActionCopyAddress()
|
||||||
{
|
{
|
||||||
auto clipboard = QApplication::clipboard();
|
auto clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(RAddressString(offset));
|
clipboard->setText(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressableItemContextMenu::onActionShowXrefs()
|
void AddressableItemContextMenu::onActionShowXrefs()
|
||||||
@ -85,7 +85,7 @@ void AddressableItemContextMenu::onActionShowXrefs()
|
|||||||
XrefsDialog dialog(mainWindow, true);
|
XrefsDialog dialog(mainWindow, true);
|
||||||
QString tmpName = name;
|
QString tmpName = name;
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
name = RAddressString(offset);
|
name = RzAddressString(offset);
|
||||||
}
|
}
|
||||||
dialog.fillRefsForAddress(offset, name, wholeFunction);
|
dialog.fillRefsForAddress(offset, name, wholeFunction);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
@ -108,7 +108,7 @@ void DecompilerContextMenu::setupBreakpointsInLineMenu()
|
|||||||
{
|
{
|
||||||
breakpointsInLineMenu->clear();
|
breakpointsInLineMenu->clear();
|
||||||
for (auto curOffset : this->availableBreakpoints) {
|
for (auto curOffset : this->availableBreakpoints) {
|
||||||
QAction *action = breakpointsInLineMenu->addAction(RAddressString(curOffset));
|
QAction *action = breakpointsInLineMenu->addAction(RzAddressString(curOffset));
|
||||||
connect(action, &QAction::triggered, this, [this, curOffset] {
|
connect(action, &QAction::triggered, this, [this, curOffset] {
|
||||||
BreakpointsDialog::editBreakpoint(Core()->getBreakpointAt(curOffset), this);
|
BreakpointsDialog::editBreakpoint(Core()->getBreakpointAt(curOffset), this);
|
||||||
});
|
});
|
||||||
@ -218,7 +218,7 @@ void DecompilerContextMenu::aboutToShowSlot()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
actionCopyInstructionAddress.setText(
|
actionCopyInstructionAddress.setText(
|
||||||
tr("Copy instruction address (%1)").arg(RAddressString(offset)));
|
tr("Copy instruction address (%1)").arg(RzAddressString(offset)));
|
||||||
if (isReference()) {
|
if (isReference()) {
|
||||||
actionCopyReferenceAddress.setVisible(true);
|
actionCopyReferenceAddress.setVisible(true);
|
||||||
RVA referenceAddr = annotationHere->reference.offset;
|
RVA referenceAddr = annotationHere->reference.offset;
|
||||||
@ -226,14 +226,14 @@ void DecompilerContextMenu::aboutToShowSlot()
|
|||||||
if (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME) {
|
if (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME) {
|
||||||
actionCopyReferenceAddress.setText(tr("Copy address of %1 (%2)")
|
actionCopyReferenceAddress.setText(tr("Copy address of %1 (%2)")
|
||||||
.arg(QString(annotationHere->reference.name),
|
.arg(QString(annotationHere->reference.name),
|
||||||
RAddressString(referenceAddr)));
|
RzAddressString(referenceAddr)));
|
||||||
} else if (flagDetails) {
|
} else if (flagDetails) {
|
||||||
actionCopyReferenceAddress.setText(
|
actionCopyReferenceAddress.setText(
|
||||||
tr("Copy address of %1 (%2)")
|
tr("Copy address of %1 (%2)")
|
||||||
.arg(flagDetails->name, RAddressString(referenceAddr)));
|
.arg(flagDetails->name, RzAddressString(referenceAddr)));
|
||||||
} else {
|
} else {
|
||||||
actionCopyReferenceAddress.setText(
|
actionCopyReferenceAddress.setText(
|
||||||
tr("Copy address (%1)").arg(RAddressString(referenceAddr)));
|
tr("Copy address (%1)").arg(RzAddressString(referenceAddr)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
actionXRefs.setVisible(false);
|
actionXRefs.setVisible(false);
|
||||||
@ -371,13 +371,13 @@ void DecompilerContextMenu::actionCopyTriggered()
|
|||||||
void DecompilerContextMenu::actionCopyInstructionAddressTriggered()
|
void DecompilerContextMenu::actionCopyInstructionAddressTriggered()
|
||||||
{
|
{
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(RAddressString(offset));
|
clipboard->setText(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecompilerContextMenu::actionCopyReferenceAddressTriggered()
|
void DecompilerContextMenu::actionCopyReferenceAddressTriggered()
|
||||||
{
|
{
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(RAddressString(annotationHere->reference.offset));
|
clipboard->setText(RzAddressString(annotationHere->reference.offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecompilerContextMenu::actionAddCommentTriggered()
|
void DecompilerContextMenu::actionAddCommentTriggered()
|
||||||
@ -404,7 +404,7 @@ void DecompilerContextMenu::actionRenameThingHereTriggered()
|
|||||||
RzAnalysisFunction *func = Core()->functionAt(func_addr);
|
RzAnalysisFunction *func = Core()->functionAt(func_addr);
|
||||||
if (func == NULL) {
|
if (func == NULL) {
|
||||||
QString function_name = QInputDialog::getText(
|
QString function_name = QInputDialog::getText(
|
||||||
this, tr("Define this function at %2").arg(RAddressString(func_addr)),
|
this, tr("Define this function at %2").arg(RzAddressString(func_addr)),
|
||||||
tr("Function name:"), QLineEdit::Normal, currentName, &ok);
|
tr("Function name:"), QLineEdit::Normal, currentName, &ok);
|
||||||
if (ok && !function_name.isEmpty()) {
|
if (ok && !function_name.isEmpty()) {
|
||||||
Core()->createFunctionAt(func_addr, function_name);
|
Core()->createFunctionAt(func_addr, function_name);
|
||||||
@ -483,7 +483,7 @@ void DecompilerContextMenu::actionXRefsTriggered()
|
|||||||
XrefsDialog dialog(mainWindow);
|
XrefsDialog dialog(mainWindow);
|
||||||
QString displayString = (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME)
|
QString displayString = (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME)
|
||||||
? QString(annotationHere->reference.name)
|
? QString(annotationHere->reference.name)
|
||||||
: RAddressString(annotationHere->reference.offset);
|
: RzAddressString(annotationHere->reference.offset);
|
||||||
dialog.fillRefsForAddress(annotationHere->reference.offset, displayString, false);
|
dialog.fillRefsForAddress(annotationHere->reference.offset, displayString, false);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
@ -519,13 +519,13 @@ void DecompilerContextMenu::actionAdvancedBreakpointTriggered()
|
|||||||
|
|
||||||
void DecompilerContextMenu::actionContinueUntilTriggered()
|
void DecompilerContextMenu::actionContinueUntilTriggered()
|
||||||
{
|
{
|
||||||
Core()->continueUntilDebug(RAddressString(offset));
|
Core()->continueUntilDebug(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DecompilerContextMenu::actionSetPCTriggered()
|
void DecompilerContextMenu::actionSetPCTriggered()
|
||||||
{
|
{
|
||||||
QString progCounterName = Core()->getRegisterName("PC");
|
QString progCounterName = Core()->getRegisterName("PC");
|
||||||
Core()->setRegister(progCounterName, RAddressString(offset).toUpper());
|
Core()->setRegister(progCounterName, RzAddressString(offset).toUpper());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up menus
|
// Set up menus
|
||||||
@ -574,13 +574,13 @@ void DecompilerContextMenu::updateTargetMenuActions()
|
|||||||
if (flagDetails) {
|
if (flagDetails) {
|
||||||
name = tr("Show %1 in").arg(flagDetails->name);
|
name = tr("Show %1 in").arg(flagDetails->name);
|
||||||
} else {
|
} else {
|
||||||
name = tr("Show %1 in").arg(RAddressString(annotationHere->reference.offset));
|
name = tr("Show %1 in").arg(RzAddressString(annotationHere->reference.offset));
|
||||||
}
|
}
|
||||||
} else if (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME) {
|
} else if (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME) {
|
||||||
menu = mainWindow->createShowInMenu(this, annotationHere->reference.offset,
|
menu = mainWindow->createShowInMenu(this, annotationHere->reference.offset,
|
||||||
MainWindow::AddressTypeHint::Function);
|
MainWindow::AddressTypeHint::Function);
|
||||||
name = tr("%1 (%2)").arg(QString(annotationHere->reference.name),
|
name = tr("%1 (%2)").arg(QString(annotationHere->reference.name),
|
||||||
RAddressString(annotationHere->reference.offset));
|
RzAddressString(annotationHere->reference.offset));
|
||||||
}
|
}
|
||||||
auto action = new QAction(name, this);
|
auto action = new QAction(name, this);
|
||||||
showTargetMenuActions.append(action);
|
showTargetMenuActions.append(action);
|
||||||
|
@ -409,7 +409,7 @@ void DisassemblyContextMenu::buildRenameMenu(ThingUsedHere *tuh)
|
|||||||
actionDeleteFlag.setVisible(false);
|
actionDeleteFlag.setVisible(false);
|
||||||
if (tuh->type == ThingUsedHere::Type::Address) {
|
if (tuh->type == ThingUsedHere::Type::Address) {
|
||||||
doRenameAction = RENAME_ADD_FLAG;
|
doRenameAction = RENAME_ADD_FLAG;
|
||||||
doRenameInfo.name = RAddressString(tuh->offset);
|
doRenameInfo.name = RzAddressString(tuh->offset);
|
||||||
doRenameInfo.addr = tuh->offset;
|
doRenameInfo.addr = tuh->offset;
|
||||||
actionRename.setText(tr("Add flag at %1 (used here)").arg(doRenameInfo.name));
|
actionRename.setText(tr("Add flag at %1 (used here)").arg(doRenameInfo.name));
|
||||||
} else if (tuh->type == ThingUsedHere::Type::Function) {
|
} else if (tuh->type == ThingUsedHere::Type::Function) {
|
||||||
@ -698,7 +698,7 @@ void DisassemblyContextMenu::on_actionEditInstruction_triggered()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EditInstructionDialog e(EDIT_TEXT, this);
|
EditInstructionDialog e(EDIT_TEXT, this);
|
||||||
e.setWindowTitle(tr("Edit Instruction at %1").arg(RAddressString(offset)));
|
e.setWindowTitle(tr("Edit Instruction at %1").arg(RzAddressString(offset)));
|
||||||
|
|
||||||
QString oldInstructionOpcode = Core()->getInstructionOpcode(offset);
|
QString oldInstructionOpcode = Core()->getInstructionOpcode(offset);
|
||||||
QString oldInstructionBytes = Core()->getInstructionBytes(offset);
|
QString oldInstructionBytes = Core()->getInstructionBytes(offset);
|
||||||
@ -725,7 +725,7 @@ void DisassemblyContextMenu::showReverseJmpQuery()
|
|||||||
{
|
{
|
||||||
QString type;
|
QString type;
|
||||||
|
|
||||||
QJsonArray array = Core()->cmdj("pdj 1 @ " + RAddressString(offset)).array();
|
QJsonArray array = Core()->cmdj("pdj 1 @ " + RzAddressString(offset)).array();
|
||||||
if (array.isEmpty()) {
|
if (array.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -752,7 +752,7 @@ void DisassemblyContextMenu::on_actionEditBytes_triggered()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EditInstructionDialog e(EDIT_BYTES, this);
|
EditInstructionDialog e(EDIT_BYTES, this);
|
||||||
e.setWindowTitle(tr("Edit Bytes at %1").arg(RAddressString(offset)));
|
e.setWindowTitle(tr("Edit Bytes at %1").arg(RzAddressString(offset)));
|
||||||
|
|
||||||
QString oldBytes = Core()->getInstructionBytes(offset);
|
QString oldBytes = Core()->getInstructionBytes(offset);
|
||||||
e.setInstruction(oldBytes);
|
e.setInstruction(oldBytes);
|
||||||
@ -773,7 +773,7 @@ void DisassemblyContextMenu::on_actionCopy_triggered()
|
|||||||
void DisassemblyContextMenu::on_actionCopyAddr_triggered()
|
void DisassemblyContextMenu::on_actionCopyAddr_triggered()
|
||||||
{
|
{
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(RAddressString(offset));
|
clipboard->setText(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisassemblyContextMenu::on_actionAddBreakpoint_triggered()
|
void DisassemblyContextMenu::on_actionAddBreakpoint_triggered()
|
||||||
@ -793,13 +793,13 @@ void DisassemblyContextMenu::on_actionAdvancedBreakpoint_triggered()
|
|||||||
|
|
||||||
void DisassemblyContextMenu::on_actionContinueUntil_triggered()
|
void DisassemblyContextMenu::on_actionContinueUntil_triggered()
|
||||||
{
|
{
|
||||||
Core()->continueUntilDebug(RAddressString(offset));
|
Core()->continueUntilDebug(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisassemblyContextMenu::on_actionSetPC_triggered()
|
void DisassemblyContextMenu::on_actionSetPC_triggered()
|
||||||
{
|
{
|
||||||
QString progCounterName = Core()->getRegisterName("PC");
|
QString progCounterName = Core()->getRegisterName("PC");
|
||||||
Core()->setRegister(progCounterName, RAddressString(offset).toUpper());
|
Core()->setRegister(progCounterName, RzAddressString(offset).toUpper());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisassemblyContextMenu::on_actionAddComment_triggered()
|
void DisassemblyContextMenu::on_actionAddComment_triggered()
|
||||||
@ -823,7 +823,7 @@ void DisassemblyContextMenu::on_actionAnalyzeFunction_triggered()
|
|||||||
|
|
||||||
// Create dialog
|
// Create dialog
|
||||||
QString functionName =
|
QString functionName =
|
||||||
QInputDialog::getText(this, tr("New function at %1").arg(RAddressString(offset)),
|
QInputDialog::getText(this, tr("New function at %1").arg(RzAddressString(offset)),
|
||||||
tr("Function name:"), QLineEdit::Normal, name, &ok);
|
tr("Function name:"), QLineEdit::Normal, name, &ok);
|
||||||
|
|
||||||
// If user accepted
|
// If user accepted
|
||||||
@ -887,7 +887,7 @@ void DisassemblyContextMenu::on_actionSetFunctionVarTypes_triggered()
|
|||||||
void DisassemblyContextMenu::on_actionXRefs_triggered()
|
void DisassemblyContextMenu::on_actionXRefs_triggered()
|
||||||
{
|
{
|
||||||
XrefsDialog dialog(mainWindow);
|
XrefsDialog dialog(mainWindow);
|
||||||
dialog.fillRefsForAddress(offset, RAddressString(offset), false);
|
dialog.fillRefsForAddress(offset, RzAddressString(offset), false);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -990,7 +990,7 @@ void DisassemblyContextMenu::on_actionLinkType_triggered()
|
|||||||
{
|
{
|
||||||
LinkTypeDialog dialog(mainWindow);
|
LinkTypeDialog dialog(mainWindow);
|
||||||
if (!dialog.setDefaultAddress(curHighlightedWord)) {
|
if (!dialog.setDefaultAddress(curHighlightedWord)) {
|
||||||
dialog.setDefaultAddress(RAddressString(offset));
|
dialog.setDefaultAddress(RzAddressString(offset));
|
||||||
}
|
}
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ void BacktraceWidget::setBacktraceGrid()
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for (const QJsonValue &value : backtraceValues) {
|
for (const QJsonValue &value : backtraceValues) {
|
||||||
QJsonObject backtraceItem = value.toObject();
|
QJsonObject backtraceItem = value.toObject();
|
||||||
QString progCounter = RAddressString(backtraceItem["pc"].toVariant().toULongLong());
|
QString progCounter = RzAddressString(backtraceItem["pc"].toVariant().toULongLong());
|
||||||
QString stackPointer = RAddressString(backtraceItem["sp"].toVariant().toULongLong());
|
QString stackPointer = RzAddressString(backtraceItem["sp"].toVariant().toULongLong());
|
||||||
int frameSize = backtraceItem["frame_size"].toVariant().toInt();
|
int frameSize = backtraceItem["frame_size"].toVariant().toInt();
|
||||||
QString funcName = backtraceItem["fname"].toString();
|
QString funcName = backtraceItem["fname"].toString();
|
||||||
QString desc = backtraceItem["desc"].toString();
|
QString desc = backtraceItem["desc"].toString();
|
||||||
|
@ -55,7 +55,7 @@ QVariant BreakpointModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case AddrColumn:
|
case AddrColumn:
|
||||||
return RAddressString(breakpoint.addr);
|
return RzAddressString(breakpoint.addr);
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return breakpoint.name;
|
return breakpoint.name;
|
||||||
case TypeColumn:
|
case TypeColumn:
|
||||||
|
@ -45,7 +45,7 @@ void CallGraphView::showExportDialog()
|
|||||||
if (global) {
|
if (global) {
|
||||||
defaultName = "global_callgraph";
|
defaultName = "global_callgraph";
|
||||||
} else {
|
} else {
|
||||||
defaultName = QString("callgraph_%1").arg(RAddressString(address));
|
defaultName = QString("callgraph_%1").arg(RzAddressString(address));
|
||||||
}
|
}
|
||||||
showExportGraphDialog(defaultName, global ? "agC" : "agc", address);
|
showExportGraphDialog(defaultName, global ? "agC" : "agc", address);
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ void CallGraphView::loadCurrentGraph()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (blockContent.empty() && !global) {
|
if (blockContent.empty() && !global) {
|
||||||
addBlock({}, RAddressString(address), address);
|
addBlock({}, RzAddressString(address), address);
|
||||||
}
|
}
|
||||||
|
|
||||||
addressMapping.clear();
|
addressMapping.clear();
|
||||||
|
@ -120,7 +120,7 @@ QVariant BinClassesModel::data(const QModelIndex &index, int role) const
|
|||||||
case TYPE:
|
case TYPE:
|
||||||
return tr("method");
|
return tr("method");
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return meth->addr == RVA_INVALID ? QString() : RAddressString(meth->addr);
|
return meth->addr == RVA_INVALID ? QString() : RzAddressString(meth->addr);
|
||||||
case VTABLE:
|
case VTABLE:
|
||||||
return meth->vtableOffset < 0 ? QString() : QString("+%1").arg(meth->vtableOffset);
|
return meth->vtableOffset < 0 ? QString() : QString("+%1").arg(meth->vtableOffset);
|
||||||
default:
|
default:
|
||||||
@ -144,7 +144,7 @@ QVariant BinClassesModel::data(const QModelIndex &index, int role) const
|
|||||||
case TYPE:
|
case TYPE:
|
||||||
return tr("field");
|
return tr("field");
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return field->addr == RVA_INVALID ? QString() : RAddressString(field->addr);
|
return field->addr == RVA_INVALID ? QString() : RzAddressString(field->addr);
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -186,9 +186,9 @@ QVariant BinClassesModel::data(const QModelIndex &index, int role) const
|
|||||||
case TYPE:
|
case TYPE:
|
||||||
return tr("class");
|
return tr("class");
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return cls->addr == RVA_INVALID ? QString() : RAddressString(cls->addr);
|
return cls->addr == RVA_INVALID ? QString() : RzAddressString(cls->addr);
|
||||||
case VTABLE:
|
case VTABLE:
|
||||||
return cls->vtableAddr == RVA_INVALID ? QString() : RAddressString(cls->vtableAddr);
|
return cls->vtableAddr == RVA_INVALID ? QString() : RzAddressString(cls->vtableAddr);
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@ -457,7 +457,7 @@ QVariant AnalClassesModel::data(const QModelIndex &index, int role) const
|
|||||||
case TYPE:
|
case TYPE:
|
||||||
return tr("method");
|
return tr("method");
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return meth.addr == RVA_INVALID ? QString() : RAddressString(meth.addr);
|
return meth.addr == RVA_INVALID ? QString() : RzAddressString(meth.addr);
|
||||||
case VTABLE:
|
case VTABLE:
|
||||||
return meth.vtableOffset < 0 ? QString()
|
return meth.vtableOffset < 0 ? QString()
|
||||||
: QString("+%1").arg(meth.vtableOffset);
|
: QString("+%1").arg(meth.vtableOffset);
|
||||||
@ -493,7 +493,7 @@ QVariant AnalClassesModel::data(const QModelIndex &index, int role) const
|
|||||||
case TYPE:
|
case TYPE:
|
||||||
return tr("vtable");
|
return tr("vtable");
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return RAddressString(vtable.addr);
|
return RzAddressString(vtable.addr);
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ QVariant CommentsModel::data(const QModelIndex &index, int role) const
|
|||||||
if (isSubnode) {
|
if (isSubnode) {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OffsetNestedColumn:
|
case OffsetNestedColumn:
|
||||||
return RAddressString(comment.offset);
|
return RzAddressString(comment.offset);
|
||||||
case CommentNestedColumn:
|
case CommentNestedColumn:
|
||||||
return comment.name;
|
return comment.name;
|
||||||
default:
|
default:
|
||||||
@ -126,7 +126,7 @@ QVariant CommentsModel::data(const QModelIndex &index, int role) const
|
|||||||
} else {
|
} else {
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case CommentsModel::OffsetColumn:
|
case CommentsModel::OffsetColumn:
|
||||||
return RAddressString(comment.offset);
|
return RzAddressString(comment.offset);
|
||||||
case CommentsModel::FunctionColumn:
|
case CommentsModel::FunctionColumn:
|
||||||
return Core()->cmdFunctionAt(comment.offset);
|
return Core()->cmdFunctionAt(comment.offset);
|
||||||
case CommentsModel::CommentColumn:
|
case CommentsModel::CommentColumn:
|
||||||
|
@ -223,7 +223,7 @@ void ConsoleWidget::executeCommand(const QString &command)
|
|||||||
}
|
}
|
||||||
ui->rzInputLineEdit->setEnabled(false);
|
ui->rzInputLineEdit->setEnabled(false);
|
||||||
|
|
||||||
QString cmd_line = "[" + RAddressString(Core()->getOffset()) + "]> " + command;
|
QString cmd_line = "[" + RzAddressString(Core()->getOffset()) + "]> " + command;
|
||||||
addOutput(cmd_line);
|
addOutput(cmd_line);
|
||||||
|
|
||||||
RVA oldOffset = Core()->getOffset();
|
RVA oldOffset = Core()->getOffset();
|
||||||
|
@ -62,7 +62,7 @@ void Dashboard::updateContents()
|
|||||||
setPlainText(this->ui->relroEdit, "N/A");
|
setPlainText(this->ui->relroEdit, "N/A");
|
||||||
}
|
}
|
||||||
|
|
||||||
setPlainText(this->ui->baddrEdit, RAddressString(item2["baddr"].toVariant().toULongLong()));
|
setPlainText(this->ui->baddrEdit, RzAddressString(item2["baddr"].toVariant().toULongLong()));
|
||||||
|
|
||||||
// set booleans
|
// set booleans
|
||||||
setBool(this->ui->vaEdit, item2, "va");
|
setBool(this->ui->vaEdit, item2, "va");
|
||||||
|
@ -179,7 +179,7 @@ void DisassemblerGraphView::loadCurrentGraph()
|
|||||||
RzAnalysisFunction *fcn = Core()->functionIn(seekable->getOffset());
|
RzAnalysisFunction *fcn = Core()->functionIn(seekable->getOffset());
|
||||||
if (fcn) {
|
if (fcn) {
|
||||||
currentFcnAddr = fcn->addr;
|
currentFcnAddr = fcn->addr;
|
||||||
QJsonDocument functionsDoc = Core()->cmdj("agJ " + RAddressString(fcn->addr));
|
QJsonDocument functionsDoc = Core()->cmdj("agJ " + RzAddressString(fcn->addr));
|
||||||
functions = functionsDoc.array();
|
functions = functionsDoc.array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ void DisassemblerGraphView::loadCurrentGraph()
|
|||||||
db.entry = block_entry;
|
db.entry = block_entry;
|
||||||
if (Config()->getGraphBlockEntryOffset()) {
|
if (Config()->getGraphBlockEntryOffset()) {
|
||||||
// QColor(0,0,0,0) is transparent
|
// QColor(0,0,0,0) is transparent
|
||||||
db.header_text = Text("[" + RAddressString(db.entry) + "]", ConfigColor("offset"),
|
db.header_text = Text("[" + RzAddressString(db.entry) + "]", ConfigColor("offset"),
|
||||||
QColor(0, 0, 0, 0));
|
QColor(0, 0, 0, 0));
|
||||||
}
|
}
|
||||||
db.true_path = RVA_INVALID;
|
db.true_path = RVA_INVALID;
|
||||||
|
@ -29,7 +29,7 @@ void EntrypointWidget::fillEntrypoint()
|
|||||||
ui->entrypointTreeWidget->clear();
|
ui->entrypointTreeWidget->clear();
|
||||||
for (const EntrypointDescription &i : Core()->getAllEntrypoint()) {
|
for (const EntrypointDescription &i : Core()->getAllEntrypoint()) {
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||||
item->setText(0, RAddressString(i.vaddr));
|
item->setText(0, RzAddressString(i.vaddr));
|
||||||
item->setText(1, i.type);
|
item->setText(1, i.type);
|
||||||
item->setData(0, Qt::UserRole, QVariant::fromValue(i));
|
item->setData(0, Qt::UserRole, QVariant::fromValue(i));
|
||||||
ui->entrypointTreeWidget->addTopLevelItem(item);
|
ui->entrypointTreeWidget->addTopLevelItem(item);
|
||||||
|
@ -32,9 +32,9 @@ QVariant ExportsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case ExportsModel::OffsetColumn:
|
case ExportsModel::OffsetColumn:
|
||||||
return RAddressString(exp.vaddr);
|
return RzAddressString(exp.vaddr);
|
||||||
case ExportsModel::SizeColumn:
|
case ExportsModel::SizeColumn:
|
||||||
return RSizeString(exp.size);
|
return RzSizeString(exp.size);
|
||||||
case ExportsModel::TypeColumn:
|
case ExportsModel::TypeColumn:
|
||||||
return exp.type;
|
return exp.type;
|
||||||
case ExportsModel::NameColumn:
|
case ExportsModel::NameColumn:
|
||||||
|
@ -36,9 +36,9 @@ QVariant FlagsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case SIZE:
|
case SIZE:
|
||||||
return RSizeString(flag.size);
|
return RzSizeString(flag.size);
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return RAddressString(flag.offset);
|
return RzAddressString(flag.offset);
|
||||||
case NAME:
|
case NAME:
|
||||||
return flag.name;
|
return flag.name;
|
||||||
case REALNAME:
|
case REALNAME:
|
||||||
|
@ -130,18 +130,18 @@ QVariant FunctionModel::data(const QModelIndex &index, int role) const
|
|||||||
if (subnode) {
|
if (subnode) {
|
||||||
switch (index.row()) {
|
switch (index.row()) {
|
||||||
case 0:
|
case 0:
|
||||||
return tr("Offset: %1").arg(RAddressString(function.offset));
|
return tr("Offset: %1").arg(RzAddressString(function.offset));
|
||||||
case 1:
|
case 1:
|
||||||
return tr("Size: %1").arg(RSizeString(function.linearSize));
|
return tr("Size: %1").arg(RzSizeString(function.linearSize));
|
||||||
case 2:
|
case 2:
|
||||||
return tr("Import: %1")
|
return tr("Import: %1")
|
||||||
.arg(functionIsImport(function.offset) ? tr("true") : tr("false"));
|
.arg(functionIsImport(function.offset) ? tr("true") : tr("false"));
|
||||||
case 3:
|
case 3:
|
||||||
return tr("Nargs: %1").arg(RSizeString(function.nargs));
|
return tr("Nargs: %1").arg(RzSizeString(function.nargs));
|
||||||
case 4:
|
case 4:
|
||||||
return tr("Nbbs: %1").arg(RSizeString(function.nbbs));
|
return tr("Nbbs: %1").arg(RzSizeString(function.nbbs));
|
||||||
case 5:
|
case 5:
|
||||||
return tr("Nlocals: %1").arg(RSizeString(function.nlocals));
|
return tr("Nlocals: %1").arg(RzSizeString(function.nlocals));
|
||||||
case 6:
|
case 6:
|
||||||
return tr("Call type: %1").arg(function.calltype);
|
return tr("Call type: %1").arg(function.calltype);
|
||||||
case 7:
|
case 7:
|
||||||
@ -164,7 +164,7 @@ QVariant FunctionModel::data(const QModelIndex &index, int role) const
|
|||||||
case ImportColumn:
|
case ImportColumn:
|
||||||
return functionIsImport(function.offset) ? tr("true") : tr("false");
|
return functionIsImport(function.offset) ? tr("true") : tr("false");
|
||||||
case OffsetColumn:
|
case OffsetColumn:
|
||||||
return RAddressString(function.offset);
|
return RzAddressString(function.offset);
|
||||||
case NargsColumn:
|
case NargsColumn:
|
||||||
return QString::number(function.nargs);
|
return QString::number(function.nargs);
|
||||||
case NlocalsColumn:
|
case NlocalsColumn:
|
||||||
|
@ -66,7 +66,7 @@ void GlibcHeapWidget::updateArenas()
|
|||||||
|
|
||||||
// add the new arenas to the arena selector
|
// add the new arenas to the arena selector
|
||||||
for (auto &arena : arenas) {
|
for (auto &arena : arenas) {
|
||||||
arenaSelectorView->addItem(RAddressString(arena.offset)
|
arenaSelectorView->addItem(RzAddressString(arena.offset)
|
||||||
+ QString(" (" + arena.type + " Arena)"));
|
+ QString(" (" + arena.type + " Arena)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,9 +138,9 @@ QVariant GlibcHeapModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OffsetColumn:
|
case OffsetColumn:
|
||||||
return RAddressString(item.offset);
|
return RzAddressString(item.offset);
|
||||||
case SizeColumn:
|
case SizeColumn:
|
||||||
return RHexString(item.size);
|
return RzHexString(item.size);
|
||||||
case StatusColumn:
|
case StatusColumn:
|
||||||
return item.status;
|
return item.status;
|
||||||
default:
|
default:
|
||||||
|
@ -29,7 +29,7 @@ QVariant HeadersModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OffsetColumn:
|
case OffsetColumn:
|
||||||
return RAddressString(header.vaddr);
|
return RzAddressString(header.vaddr);
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return header.name;
|
return header.name;
|
||||||
case ValueColumn:
|
case ValueColumn:
|
||||||
|
@ -36,7 +36,7 @@ void HeapBinsGraphView::loadCurrentGraph()
|
|||||||
|| QString(heapBin->type) == QString("Tcache");
|
|| QString(heapBin->type) == QString("Tcache");
|
||||||
|
|
||||||
// store info about the chunks in a vector for easy access
|
// store info about the chunks in a vector for easy access
|
||||||
CutterRListForeach(heapBin->chunks, iter, RzHeapChunkListItem, item)
|
CutterRzListForeach(heapBin->chunks, iter, RzHeapChunkListItem, item)
|
||||||
{
|
{
|
||||||
GraphHeapChunk graphHeapChunk;
|
GraphHeapChunk graphHeapChunk;
|
||||||
graphHeapChunk.addr = item->addr;
|
graphHeapChunk.addr = item->addr;
|
||||||
@ -44,12 +44,12 @@ void HeapBinsGraphView::loadCurrentGraph()
|
|||||||
if (!chunkInfo) {
|
if (!chunkInfo) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
QString content = "Chunk @ " + RAddressString(chunkInfo->addr) + "\nSize: "
|
QString content = "Chunk @ " + RzAddressString(chunkInfo->addr) + "\nSize: "
|
||||||
+ RHexString(chunkInfo->size) + "\nFd: " + RAddressString(chunkInfo->fd);
|
+ RzHexString(chunkInfo->size) + "\nFd: " + RzAddressString(chunkInfo->fd);
|
||||||
|
|
||||||
// fastbins lack bk pointer
|
// fastbins lack bk pointer
|
||||||
if (!singleLinkedBin) {
|
if (!singleLinkedBin) {
|
||||||
content += "\nBk: " + RAddressString(chunkInfo->bk);
|
content += "\nBk: " + RzAddressString(chunkInfo->bk);
|
||||||
}
|
}
|
||||||
graphHeapChunk.fd = chunkInfo->fd;
|
graphHeapChunk.fd = chunkInfo->fd;
|
||||||
graphHeapChunk.bk = chunkInfo->bk;
|
graphHeapChunk.bk = chunkInfo->bk;
|
||||||
@ -79,9 +79,9 @@ void HeapBinsGraphView::display_single_linked_list(QVector<GraphHeapChunk> chunk
|
|||||||
gbBin.edges.emplace_back(heapBin->fd);
|
gbBin.edges.emplace_back(heapBin->fd);
|
||||||
QString content = tr(heapBin->type) + tr("bin ") + QString::number(heapBin->bin_num);
|
QString content = tr(heapBin->type) + tr("bin ") + QString::number(heapBin->bin_num);
|
||||||
if (tcache) {
|
if (tcache) {
|
||||||
content += "\nEntry: " + RAddressString(heapBin->fd);
|
content += "\nEntry: " + RzAddressString(heapBin->fd);
|
||||||
} else {
|
} else {
|
||||||
content += "\nFd: " + RAddressString(heapBin->fd);
|
content += "\nFd: " + RzAddressString(heapBin->fd);
|
||||||
}
|
}
|
||||||
addBlock(gbBin, content);
|
addBlock(gbBin, content);
|
||||||
|
|
||||||
@ -120,9 +120,9 @@ void HeapBinsGraphView::display_double_linked_list(QVector<GraphHeapChunk> chunk
|
|||||||
gbBin.edges.emplace_back(heapBin->fd);
|
gbBin.edges.emplace_back(heapBin->fd);
|
||||||
gbBin.edges.emplace_back(heapBin->bk);
|
gbBin.edges.emplace_back(heapBin->bk);
|
||||||
QString content = tr(heapBin->type) + tr("bin ") + QString::number(heapBin->bin_num) + tr(" @ ")
|
QString content = tr(heapBin->type) + tr("bin ") + QString::number(heapBin->bin_num) + tr(" @ ")
|
||||||
+ RAddressString(heapBin->addr);
|
+ RzAddressString(heapBin->addr);
|
||||||
content += "\nFd: " + RAddressString(heapBin->fd);
|
content += "\nFd: " + RzAddressString(heapBin->fd);
|
||||||
content += "\nBk: " + RAddressString(heapBin->bk);
|
content += "\nBk: " + RzAddressString(heapBin->bk);
|
||||||
|
|
||||||
addBlock(gbBin, content, heapBin->addr);
|
addBlock(gbBin, content, heapBin->addr);
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ void HexWidget::copyAddress()
|
|||||||
addr = selection.start();
|
addr = selection.start();
|
||||||
}
|
}
|
||||||
QClipboard *clipboard = QApplication::clipboard();
|
QClipboard *clipboard = QApplication::clipboard();
|
||||||
clipboard->setText(RAddressString(addr));
|
clipboard->setText(RzAddressString(addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HexWidget::onRangeDialogAccepted()
|
void HexWidget::onRangeDialogAccepted()
|
||||||
|
@ -38,7 +38,7 @@ QVariant ImportsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case ImportsModel::AddressColumn:
|
case ImportsModel::AddressColumn:
|
||||||
return RAddressString(import.plt);
|
return RzAddressString(import.plt);
|
||||||
case ImportsModel::TypeColumn:
|
case ImportsModel::TypeColumn:
|
||||||
return import.type;
|
return import.type;
|
||||||
case ImportsModel::SafetyColumn:
|
case ImportsModel::SafetyColumn:
|
||||||
|
@ -30,9 +30,9 @@ QVariant MemoryMapModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case AddrStartColumn:
|
case AddrStartColumn:
|
||||||
return RAddressString(memoryMap.addrStart);
|
return RzAddressString(memoryMap.addrStart);
|
||||||
case AddrEndColumn:
|
case AddrEndColumn:
|
||||||
return RAddressString(memoryMap.addrEnd);
|
return RzAddressString(memoryMap.addrEnd);
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return memoryMap.name;
|
return memoryMap.name;
|
||||||
case PermColumn:
|
case PermColumn:
|
||||||
|
@ -189,7 +189,7 @@ void RegisterRefsWidget::refreshRegisterRef()
|
|||||||
for (const QJsonObject ® : regRefs) {
|
for (const QJsonObject ® : regRefs) {
|
||||||
RegisterRefDescription desc;
|
RegisterRefDescription desc;
|
||||||
|
|
||||||
desc.value = RAddressString(reg["value"].toVariant().toULongLong());
|
desc.value = RzAddressString(reg["value"].toVariant().toULongLong());
|
||||||
desc.reg = reg["name"].toVariant().toString();
|
desc.reg = reg["name"].toVariant().toString();
|
||||||
desc.refDesc = Core()->formatRefDesc(reg["ref"].toObject());
|
desc.refDesc = Core()->formatRefDesc(reg["ref"].toObject());
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ QVariant RelocsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case RelocsModel::VAddrColumn:
|
case RelocsModel::VAddrColumn:
|
||||||
return RAddressString(reloc.vaddr);
|
return RzAddressString(reloc.vaddr);
|
||||||
case RelocsModel::TypeColumn:
|
case RelocsModel::TypeColumn:
|
||||||
return reloc.type;
|
return reloc.type;
|
||||||
case RelocsModel::NameColumn:
|
case RelocsModel::NameColumn:
|
||||||
|
@ -29,7 +29,7 @@ QVariant ResourcesModel::data(const QModelIndex &index, int role) const
|
|||||||
case NAME:
|
case NAME:
|
||||||
return res.name;
|
return res.name;
|
||||||
case VADDR:
|
case VADDR:
|
||||||
return RAddressString(res.vaddr);
|
return RzAddressString(res.vaddr);
|
||||||
case INDEX:
|
case INDEX:
|
||||||
return QString::number(res.index);
|
return QString::number(res.index);
|
||||||
case TYPE:
|
case TYPE:
|
||||||
|
@ -57,9 +57,9 @@ QVariant SearchModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OFFSET:
|
case OFFSET:
|
||||||
return RAddressString(exp.offset);
|
return RzAddressString(exp.offset);
|
||||||
case SIZE:
|
case SIZE:
|
||||||
return RSizeString(exp.size);
|
return RzSizeString(exp.size);
|
||||||
case CODE:
|
case CODE:
|
||||||
return exp.code;
|
return exp.code;
|
||||||
case DATA:
|
case DATA:
|
||||||
|
@ -57,13 +57,13 @@ QVariant SectionsModel::data(const QModelIndex &index, int role) const
|
|||||||
case SectionsModel::NameColumn:
|
case SectionsModel::NameColumn:
|
||||||
return section.name;
|
return section.name;
|
||||||
case SectionsModel::SizeColumn:
|
case SectionsModel::SizeColumn:
|
||||||
return RSizeString(section.size);
|
return RzSizeString(section.size);
|
||||||
case SectionsModel::AddressColumn:
|
case SectionsModel::AddressColumn:
|
||||||
return RAddressString(section.vaddr);
|
return RzAddressString(section.vaddr);
|
||||||
case SectionsModel::EndAddressColumn:
|
case SectionsModel::EndAddressColumn:
|
||||||
return RAddressString(section.vaddr + section.vsize);
|
return RzAddressString(section.vaddr + section.vsize);
|
||||||
case SectionsModel::VirtualSizeColumn:
|
case SectionsModel::VirtualSizeColumn:
|
||||||
return RSizeString(section.vsize);
|
return RzSizeString(section.vsize);
|
||||||
case SectionsModel::PermissionsColumn:
|
case SectionsModel::PermissionsColumn:
|
||||||
return section.perm;
|
return section.perm;
|
||||||
case SectionsModel::EntropyColumn:
|
case SectionsModel::EntropyColumn:
|
||||||
@ -368,8 +368,8 @@ void AbstractAddrDock::updateDock()
|
|||||||
rect->setBrush(QBrush(idx.data(Qt::DecorationRole).value<QColor>()));
|
rect->setBrush(QBrush(idx.data(Qt::DecorationRole).value<QColor>()));
|
||||||
addrDockScene->addItem(rect);
|
addrDockScene->addItem(rect);
|
||||||
|
|
||||||
addTextItem(textColor, QPoint(0, y), RAddressString(addr));
|
addTextItem(textColor, QPoint(0, y), RzAddressString(addr));
|
||||||
addTextItem(textColor, QPoint(rectOffset, y), RSizeString(size));
|
addTextItem(textColor, QPoint(rectOffset, y), RzSizeString(size));
|
||||||
addTextItem(textColor, QPoint(rectOffset + rectWidth, y), name);
|
addTextItem(textColor, QPoint(rectOffset + rectWidth, y), name);
|
||||||
|
|
||||||
addrDockScene->namePosYMap[name] = y;
|
addrDockScene->namePosYMap[name] = y;
|
||||||
@ -458,7 +458,7 @@ void AddrDockScene::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
{
|
{
|
||||||
RVA addr = getAddrFromPos((int)event->scenePos().y(), false);
|
RVA addr = getAddrFromPos((int)event->scenePos().y(), false);
|
||||||
if (addr != RVA_INVALID) {
|
if (addr != RVA_INVALID) {
|
||||||
QToolTip::showText(event->screenPos(), RAddressString(addr));
|
QToolTip::showText(event->screenPos(), RzAddressString(addr));
|
||||||
if (event->buttons() & Qt::LeftButton) {
|
if (event->buttons() & Qt::LeftButton) {
|
||||||
RVA seekAddr = getAddrFromPos((int)event->scenePos().y(), true);
|
RVA seekAddr = getAddrFromPos((int)event->scenePos().y(), true);
|
||||||
disableCenterOn = true;
|
disableCenterOn = true;
|
||||||
|
@ -51,9 +51,9 @@ QVariant SegmentsModel::data(const QModelIndex &index, int role) const
|
|||||||
case SegmentsModel::SizeColumn:
|
case SegmentsModel::SizeColumn:
|
||||||
return QString::number(segment.size);
|
return QString::number(segment.size);
|
||||||
case SegmentsModel::AddressColumn:
|
case SegmentsModel::AddressColumn:
|
||||||
return RAddressString(segment.vaddr);
|
return RzAddressString(segment.vaddr);
|
||||||
case SegmentsModel::EndAddressColumn:
|
case SegmentsModel::EndAddressColumn:
|
||||||
return RAddressString(segment.vaddr + segment.size);
|
return RzAddressString(segment.vaddr + segment.size);
|
||||||
case SegmentsModel::PermColumn:
|
case SegmentsModel::PermColumn:
|
||||||
return segment.perm;
|
return segment.perm;
|
||||||
case SegmentsModel::CommentColumn:
|
case SegmentsModel::CommentColumn:
|
||||||
|
@ -222,7 +222,7 @@ void SimpleTextGraphView::blockHelpEvent(GraphView::GraphBlock &block, QHelpEven
|
|||||||
QPoint /*pos*/)
|
QPoint /*pos*/)
|
||||||
{
|
{
|
||||||
if (haveAddresses) {
|
if (haveAddresses) {
|
||||||
QToolTip::showText(event->globalPos(), RAddressString(blockContent[block.entry].address));
|
QToolTip::showText(event->globalPos(), RzAddressString(blockContent[block.entry].address));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ void StackModel::reload()
|
|||||||
Item item;
|
Item item;
|
||||||
|
|
||||||
item.offset = stackItem["addr"].toVariant().toULongLong();
|
item.offset = stackItem["addr"].toVariant().toULongLong();
|
||||||
item.value = RAddressString(stackItem["value"].toVariant().toULongLong());
|
item.value = RzAddressString(stackItem["value"].toVariant().toULongLong());
|
||||||
item.refDesc = Core()->formatRefDesc(stackItem["ref"].toObject());
|
item.refDesc = Core()->formatRefDesc(stackItem["ref"].toObject());
|
||||||
|
|
||||||
values.push_back(item);
|
values.push_back(item);
|
||||||
@ -182,7 +182,7 @@ QVariant StackModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OffsetColumn:
|
case OffsetColumn:
|
||||||
return RAddressString(item.offset);
|
return RzAddressString(item.offset);
|
||||||
case ValueColumn:
|
case ValueColumn:
|
||||||
return item.value;
|
return item.value;
|
||||||
case DescriptionColumn:
|
case DescriptionColumn:
|
||||||
|
@ -35,7 +35,7 @@ QVariant StringsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case StringsModel::OffsetColumn:
|
case StringsModel::OffsetColumn:
|
||||||
return RAddressString(str.vaddr);
|
return RzAddressString(str.vaddr);
|
||||||
case StringsModel::StringColumn:
|
case StringsModel::StringColumn:
|
||||||
return str.string;
|
return str.string;
|
||||||
case StringsModel::TypeColumn:
|
case StringsModel::TypeColumn:
|
||||||
|
@ -32,7 +32,7 @@ QVariant SymbolsModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case SymbolsModel::AddressColumn:
|
case SymbolsModel::AddressColumn:
|
||||||
return RAddressString(symbol.vaddr);
|
return RzAddressString(symbol.vaddr);
|
||||||
case SymbolsModel::TypeColumn:
|
case SymbolsModel::TypeColumn:
|
||||||
return QString("%1 %2").arg(symbol.bind, symbol.type).trimmed();
|
return QString("%1 %2").arg(symbol.bind, symbol.type).trimmed();
|
||||||
case SymbolsModel::NameColumn:
|
case SymbolsModel::NameColumn:
|
||||||
|
@ -336,7 +336,7 @@ void TypesWidget::on_actionLink_Type_To_Address_triggered()
|
|||||||
if (index.isValid()) {
|
if (index.isValid()) {
|
||||||
TypeDescription t = index.data(TypesModel::TypeDescriptionRole).value<TypeDescription>();
|
TypeDescription t = index.data(TypesModel::TypeDescriptionRole).value<TypeDescription>();
|
||||||
dialog.setDefaultType(t.type);
|
dialog.setDefaultType(t.type);
|
||||||
dialog.setDefaultAddress(RAddressString(Core()->getOffset()));
|
dialog.setDefaultAddress(RzAddressString(Core()->getOffset()));
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ QVariant VTableModel::data(const QModelIndex &index, int role) const
|
|||||||
case NAME:
|
case NAME:
|
||||||
return res.name;
|
return res.name;
|
||||||
case ADDRESS:
|
case ADDRESS:
|
||||||
return RAddressString(res.addr);
|
return RzAddressString(res.addr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VTableDescriptionRole:
|
case VTableDescriptionRole:
|
||||||
@ -62,7 +62,7 @@ QVariant VTableModel::data(const QModelIndex &index, int role) const
|
|||||||
case NAME:
|
case NAME:
|
||||||
return tr("VTable") + " " + QString::number(index.row() + 1);
|
return tr("VTable") + " " + QString::number(index.row() + 1);
|
||||||
case ADDRESS:
|
case ADDRESS:
|
||||||
return RAddressString(vtables->at(index.row()).addr);
|
return RzAddressString(vtables->at(index.row()).addr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VTableDescriptionRole: {
|
case VTableDescriptionRole: {
|
||||||
|
@ -297,7 +297,7 @@ QList<QString> VisualNavbar::sectionsForAddress(RVA address)
|
|||||||
|
|
||||||
QString VisualNavbar::toolTipForAddress(RVA address)
|
QString VisualNavbar::toolTipForAddress(RVA address)
|
||||||
{
|
{
|
||||||
QString ret = "Address: " + RAddressString(address);
|
QString ret = "Address: " + RzAddressString(address);
|
||||||
|
|
||||||
// Don't append sections when a debug task is in progress to avoid freezing the interface
|
// Don't append sections when a debug task is in progress to avoid freezing the interface
|
||||||
if (Core()->isDebugTaskInProgress()) {
|
if (Core()->isDebugTaskInProgress()) {
|
||||||
|
@ -29,7 +29,7 @@ QVariant ZignaturesModel::data(const QModelIndex &index, int role) const
|
|||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case OffsetColumn:
|
case OffsetColumn:
|
||||||
return RAddressString(zignature.offset);
|
return RzAddressString(zignature.offset);
|
||||||
case NameColumn:
|
case NameColumn:
|
||||||
return zignature.name;
|
return zignature.name;
|
||||||
case ValueColumn:
|
case ValueColumn:
|
||||||
@ -42,10 +42,10 @@ QVariant ZignaturesModel::data(const QModelIndex &index, int role) const
|
|||||||
return QVariant::fromValue(zignature);
|
return QVariant::fromValue(zignature);
|
||||||
|
|
||||||
case Qt::ToolTipRole: {
|
case Qt::ToolTipRole: {
|
||||||
QString tmp = QString("Graph:\n\n Cyclomatic complexity: " + RSizeString(zignature.cc)
|
QString tmp = QString("Graph:\n\n Cyclomatic complexity: " + RzSizeString(zignature.cc)
|
||||||
+ "\n Nodes / basicblocks: " + RSizeString(zignature.nbbs)
|
+ "\n Nodes / basicblocks: " + RzSizeString(zignature.nbbs)
|
||||||
+ "\n Edges: " + RSizeString(zignature.edges)
|
+ "\n Edges: " + RzSizeString(zignature.edges)
|
||||||
+ "\n Ebbs: " + RSizeString(zignature.ebbs) + "\n\nRefs:\n");
|
+ "\n Ebbs: " + RzSizeString(zignature.ebbs) + "\n\nRefs:\n");
|
||||||
for (const QString &ref : zignature.refs) {
|
for (const QString &ref : zignature.refs) {
|
||||||
tmp.append("\n " + ref);
|
tmp.append("\n " + ref);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user