DynamoRIO / DynamoRIO/dynamorio
feature: print negative memory operand offsets as "-absvalue"
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
_From [timurrrr@google.com](https://code.google.com/u/timurrrr@google.com/) on June 11, 2013 13:28:35_
For this assembly (objdump -D):
c7 40 f8 00 00 00 00 movl $0x0,-0x8(%rax)
48 89 68 e8 mov %rbp,-0x18(%rax)
c6 04 28 00 movb $0x0,(%rax,%rbp,1)
eb c9 jmp
DR instrlist_disassemble produces this on Linux x64:
c7 40 f8 00 00 00 00 mov $0x00000000 -> 0xfffffff8(%rax)
48 89 68 e8 mov %rbp -> 0xffffffe8(%rax)
c6 04 28 00 mov $0x00 -> (%rax,%rbp,1)
eb c9 jmp
Please note that negative offsets are printed as 32-bits rather than 64-bits.
[Also I find them not very readable]
Is it a printing-only problem?
When I use "drutil_insert_get_mem_addr()" on such an operand and print the instrumentation with instrlist_disassemble it printst out the weird offset too:
48 8d 40 f8 lea 0xfffffff8(%rax) -> %rax
However, objdump thinks this is -0x8 again:
48 8d 40 f8 lea -0x8(%rax),%rax
This is confusing.
_Original issue: http://code.google.com/p/dynamorio/issues/detail?id=1186_
Contributor guide
Assessment
This issue has not been assessed yet.