Search
lxdream.org :: lxdream/src/x86dasm/x86dasm.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/x86dasm/x86dasm.c
changeset 920:1e6a29649b56
prev755:ab873907b00e
next925:7cbcc51db63d
author nkeynes
date Thu Dec 04 09:06:35 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Update to print symbols for matching operands
file annotate diff log raw
1.1 --- a/src/x86dasm/x86dasm.c Mon Jul 21 00:08:34 2008 +0000
1.2 +++ b/src/x86dasm/x86dasm.c Thu Dec 04 09:06:35 2008 +0000
1.3 @@ -104,6 +104,18 @@
1.4 }
1.5 }
1.6
1.7 +void x86_print_symbolic_operand( char *buf, int hex, unsigned int disp )
1.8 +{
1.9 + const char *sym = x86_find_symbol(disp, NULL);
1.10 + if( sym != NULL ) {
1.11 + snprintf( buf, 50, "<%s>", sym );
1.12 + } else if( hex ) {
1.13 + sprintf( buf, "0x%x", disp );
1.14 + } else {
1.15 + sprintf( buf, "%d", (int)disp );
1.16 + }
1.17 +}
1.18 +
1.19 uint32_t x86_disasm_instruction( uintptr_t pc, char *buf, int len, char *opcode )
1.20 {
1.21 int count, i;
.