Do not set asm.bits depending on CPSR to give more freedom to the user

This commit is contained in:
pancake 2016-05-11 15:38:26 +02:00
parent 75ea9cea3c
commit 8b61811a75
2 changed files with 11 additions and 4 deletions

View File

@ -1343,10 +1343,12 @@ static void __anal_reg_list(RCore *core, int type, int size, char mode) {
int pcbits = 0;
const char *pcname = r_reg_get_name (core->anal->reg, R_REG_NAME_PC);
RRegItem *reg = r_reg_get (core->anal->reg, pcname, 0);
if (bits != reg->size)
if (bits != reg->size) {
pcbits = reg->size;
if (pcbits)
}
if (pcbits) {
r_debug_reg_list (core->dbg, R_REG_TYPE_GPR, pcbits, 2, use_color); // XXX detect which one is current usage
}
}
r_debug_reg_list (core->dbg, type, bits, mode, use_color);
core->dbg->reg = hack;
@ -2063,7 +2065,9 @@ static bool cmd_aea(RCore* core, int mode, ut64 addr, int length) {
if (!core)
return false;
maxopsize = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
if (maxopsize < 1) maxopsize = 16;
if (maxopsize < 1) {
maxopsize = 16;
}
if (mode & 1) {
// number of bytes / length
buf_sz = length;

View File

@ -108,7 +108,9 @@ R_API int r_debug_reg_list(RDebug *dbg, int type, int size, int rad, const char
if (!head) continue;
r_list_foreach (head, iter, item) {
ut64 value;
#if 0
/* the thumb flag in the cpsr register shouldnt forbid us to switch between arm or thumb */
/* this code must run only after a step maybe ... need some discussion, disabling for now */
if (is_arm && (rad == 1 || rad == '*') && item->size == 1) {
if (!strcmp (item->name, "tf")) {
bool is_thumb = r_reg_get_value (dbg->reg, item);
@ -118,6 +120,7 @@ R_API int r_debug_reg_list(RDebug *dbg, int type, int size, int rad, const char
}
continue;
}
#endif
if (type != -1) {
if (type != item->type) continue;