Skip to content

Commit

Permalink
More disasm fixes, remove old code
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 20, 2014
1 parent ae85c1c commit 62d11ca
Show file tree
Hide file tree
Showing 3 changed files with 733 additions and 1,976 deletions.
2 changes: 1 addition & 1 deletion doc/fortunes
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Find cp850 strings with 'e cfg.encoding=cp850' and '/s'
Enhace your graphs by increasing the size of the block and graph.depth eval variable
Control the height of the terminal on serial consoles with e scr.height
Use e file.id=true and e file.flag=true in your ~/.radarerc to get symbols, strings, .. when loading
Disassemble unsupported architectures with external objdump defined in e asm.objdump. Use 'pd' command.
Emulate the base address of a file with e file.baddr
Dump the class header information with 'javasm -c <file.class>'. Plugind by radare if file.id=true
Use gradare if you prefer simple frontend for gui users
Expand Down Expand Up @@ -197,3 +196,4 @@ Sharing your latest session in Facebook...
This should be documented, since it's not that obvious
It's working! Look at the door!
This is an unacceptable milion year dungeon.
The Hard ROP Cafe
14 changes: 9 additions & 5 deletions libr/anal/meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ R_API int r_meta_del(RMeta *m, int type, ut64 from, ut64 size, const char *str)
if (d->type == type || type == R_META_TYPE_ANY) {
if (str && d->str && !strstr (d->str, str))
continue;
if (size==UT64_MAX || (from+size >= d->from && from <= d->to+size)) {
if (size==UT64_MAX || (from+size >= d->from && from <= d->to-size)) {
free (d->str);
r_list_delete (m->data, iter);
ret++;
Expand Down Expand Up @@ -219,7 +219,7 @@ R_API RMetaItem *r_meta_find(RMeta *m, ut64 off, int type, int where) {
it = d;
break;
case R_META_WHERE_HERE:
if (off>=d->from && (!off || (off<d->to)))
if (!off || ((off>=d->from) && (off<d->to)))
it = d;
break;
case R_META_WHERE_NEXT:
Expand Down Expand Up @@ -313,9 +313,13 @@ static void printmetaitem(RMeta *m, RMetaItem *d, int rad) {
case 1:
case '*':
default:
m->printf ("\"%s %s\" @ 0x%08"PFMT64x"\n",
r_meta_type_to_string (d->type), pstr, d->from);
// (int)(d->to-d->from),
if (d->type == 'C') {
m->printf ("\"%s %s\" @ 0x%08"PFMT64x"\n",
r_meta_type_to_string (d->type), pstr, d->from);
} else {
m->printf ("%s %d 0x%08"PFMT64x" # %s\n",
r_meta_type_to_string (d->type), d->size, d->from, pstr);
}
break;
}
free (str);
Expand Down
Loading

0 comments on commit 62d11ca

Please sign in to comment.