summaryrefslogtreecommitdiff
blob: 2e83c93d19af100fa538b3da03e82ad9b2021e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
diff -NrU5 elfsh-0.51b3.original/modules/modgraph.c elfsh-0.51b3/modules/modgraph.c
--- elfsh-0.51b3.original/modules/modgraph.c	2009-07-22 23:17:51.000000000 -0600
+++ elfsh-0.51b3/modules/modgraph.c	2009-07-22 23:33:28.000000000 -0600
@@ -181,11 +181,11 @@
       }
     }
   else
     {
       name = elfsh_reverse_metasym(world.current, blk->vaddr, &off);
-      dprintf(fd, "%s_%08x", name, off);
+      d_printf(fd, "%s_%08x", name, off);
 
       }
   free(buffer);
   world.state.vm_quiet = vm_quiet;
 }
diff -NrU5 elfsh-0.51b3.original/vm/disasm.c elfsh-0.51b3/vm/disasm.c
--- elfsh-0.51b3.original/vm/disasm.c	2009-07-22 23:17:51.000000000 -0600
+++ elfsh-0.51b3/vm/disasm.c	2009-07-22 23:33:53.000000000 -0600
@@ -80,30 +80,30 @@
   
   /* Are we in quiet mode ? */
   if (world.state.vm_quiet)
     {
       snprintf(buf, sizeof(buf), " %08X %s + %u", vaddr + index, name, nindex);
-      dprintf(fd, "%-40s %-30s ", buf, s);
+      d_printf(fd, "%-40s %-30s ", buf, s);
     }
   else
     {
       snprintf(buf, sizeof(buf), " %08X [foff: %u] %s + %u", 
 	      vaddr + index, foffset + index, name, nindex);
-      dprintf(fd, "%-60s %-50s ", buf, s);
+      d_printf(fd, "%-60s %-50s ", buf, s);
     }
   
   /* Print bytes in hexa for this instruction */
   ret = asm_instr_len(&ptr);
   if (!ret)
     ret++;
   
   if (!world.state.vm_quiet)
     for (idx_bytes = 0; idx_bytes < ret; idx_bytes++)
-      dprintf(fd, "%c%c ", 
+      d_printf(fd, "%c%c ", 
 	     base[(buff[index + idx_bytes] >> 4) & 0x0F], 
 	     base[buff[index + idx_bytes] & 0x0F]);
-  dprintf(fd, "\n");
+  d_printf(fd, "\n");
   return (ret);
 }
 #endif	/* USE_LIBASM */
 
 
diff -NrU5 elfsh-0.51b3.original/vm/include/elfsh.h elfsh-0.51b3/vm/include/elfsh.h
--- elfsh-0.51b3.original/vm/include/elfsh.h	2009-07-22 23:17:51.000000000 -0600
+++ elfsh-0.51b3/vm/include/elfsh.h	2009-07-22 23:22:30.000000000 -0600
@@ -469,11 +469,11 @@
 int		vm_getsort(u_int index, u_int argc, char **argv);
 int		vm_getdisasm(u_int index, u_int argc, char **argv);
 int		vm_gethexa(u_int index, u_int argc, char **argv);
 int		vm_getvarparams(u_int index, u_int argc, char **argv);
 
-int		dprintf(int fd, char *format, ...);
+int		d_printf(int fd, char *format, ...);
 
 /* Libasm resolve handler */
 void		do_resolve(void *data, u_int vaddr, char *, u_int);
 u_int		display_instr(int, u_int, u_int, u_int, u_int,
 			      char *, u_int, char *);