radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.59k stars 2.99k forks source link

Any plans regarding support of structure offsets and enums in the disassembly? #5934

Closed bluec0re closed 7 years ago

bluec0re commented 8 years ago

Like IDA Pro does [1] [2]. I think the later one might work with a flag (workaround?)?

e.g.: from

mov eax, 1
mov rbx, [rax + 0x20]

to

mov eax, PF_Exec
mov rbx, [rax + elf_header.phoff]

[1] https://www.hex-rays.com/products/ida/support/idadoc/472.shtml [2] https://www.hex-rays.com/products/ida/support/idadoc/473.shtml

Maijin commented 8 years ago

It's already supported with t command @XVilka @oddcoder can give you more insight

bluec0re commented 8 years ago

I'd already implemented it for local variables (t command), but couldn't find it during the implementation in a general manner (maybe something for the hint part?)

bluec0re commented 8 years ago

what's about replacing the (numeric) immbase implementation of hints with pf format strings? This would make it much more flexible and could represent all of the current supported bases, right?

XVilka commented 8 years ago

At first, this is currently unsupported as-is, but can be workarounded with ahi, if improve it a bit. But yes, full fledged support is already in plans.

MariasStory commented 7 years ago

I am not sure if it is the right ticket to ask. Is this one related to the problem described in the following solution: https://insinuator.net/2016/10/reverse-engineering-with-radare2-part-3/ Shouldn't it be done automatically?

Maijin commented 7 years ago

This blog post seems to use old radare2, the visual graph isn't utf8

bluec0re commented 7 years ago

It's using the most current git version of 10/24/2016. I'd just disabled the utf-8 output as I didn't had the time to make it work in the blog HTML output.

edit: or maybe a few days earlier due to a review was taking place after I wrote it.

radare commented 7 years ago

are you using scr.html=true ?

On 07 Nov 2016, at 21:17, BlueC0re notifications@github.com wrote:

It's using the most current git version of 10/24/2016. I'd just disabled the utf-8 output as I didn't had the time to make it work in the blog HTML output.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/5934#issuecomment-258950024, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-liHSXHcaOC9SzyaDhDXAZpuaNmOtks5q74dPgaJpZM4KP1cN.

bluec0re commented 7 years ago

Not yet as it interrupted my workflow during the post development. Something like a HTML pipe would be nice. So you would have a ASCII colored output in the console but a HTML one if you redirect it to a file or command.

radare commented 7 years ago

@bluec0re see latest master. i have added H> for the html pipe

bluec0re commented 7 years ago

Nice, thx! :smiley: