summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2008-10-20 23:15:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2008-10-20 23:15:25 (GMT)
commitac438e8ad47f267c9eb6f462eb5a7e2b5c017f26 (patch)
tree5d1b350d7dd1f70b58de97e8aa8952cbadecd9ee /src/arch
parent10deb6bbbeeaacfec577f5b24c5f821492af77f3 (diff)
Registered all found strings in binaries.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@36 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/processor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/arch/x86/processor.c b/src/arch/x86/processor.c
index 5694d9e..14f35bc 100644
--- a/src/arch/x86/processor.c
+++ b/src/arch/x86/processor.c
@@ -446,8 +446,18 @@ void x86_print_instruction(const asm_x86_processor *proc, const exe_format *form
{
oplen = strlen(opbuffer[i]);
- if (offset == 0) snprintf(&opbuffer[i][oplen], 256 - oplen, " &lt;%s&gt;", label);
- else snprintf(&opbuffer[i][oplen], 256 - oplen, " &lt;%s+0x%llx&gt;", label, offset);
+ switch (symtype)
+ {
+ case STP_SECTION:
+ if (offset == 0) snprintf(&opbuffer[i][oplen], 256 - oplen, " &lt;%s&gt;", label);
+ else snprintf(&opbuffer[i][oplen], 256 - oplen, " &lt;%s+0x%llx&gt;", label, offset);
+ break;
+
+ case STP_STRING:
+ snprintf(&opbuffer[i][oplen], 256 - oplen, " \"%s\"", label);
+ break;
+
+ }
free(label);