aboutsummaryrefslogtreecommitdiff
path: root/tools/compact-unwind
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-02-09 01:44:09 +0000
committerEd Maste <emaste@FreeBSD.org>2015-02-09 01:44:09 +0000
commit12bd4897ff0678fa663e09d78ebc22dd255ceb86 (patch)
treea8f4b3abea3e6937e60728991c736e6e3d322fc1 /tools/compact-unwind
parent205afe679855a4ce8149cdaa94d3f0868ce796dc (diff)
downloadsrc-12bd4897ff0678fa663e09d78ebc22dd255ceb86.tar.gz
src-12bd4897ff0678fa663e09d78ebc22dd255ceb86.zip
Import LLDB as of upstream SVN 228549 (git 39760838)vendor/lldb/lldb-r228549
Notes
Notes: svn path=/vendor/lldb/dist/; revision=278425 svn path=/vendor/lldb/lldb-r228549/; revision=278426; tag=vendor/lldb/lldb-r228549
Diffstat (limited to 'tools/compact-unwind')
-rw-r--r--tools/compact-unwind/compact-unwind-dumper.c50
1 files changed, 44 insertions, 6 deletions
diff --git a/tools/compact-unwind/compact-unwind-dumper.c b/tools/compact-unwind/compact-unwind-dumper.c
index fd8ea2161896..0f898dbc76b4 100644
--- a/tools/compact-unwind/compact-unwind-dumper.c
+++ b/tools/compact-unwind/compact-unwind-dumper.c
@@ -495,7 +495,14 @@ print_encoding_x86_64 (struct baton baton, uint8_t *function_start, uint32_t enc
printf ("large stack ");
}
- printf ("frameless function: stack size %d, register count %d ", stack_size * 8, register_count);
+ if (mode == UNWIND_X86_64_MODE_STACK_IND)
+ {
+ printf ("frameless function: stack size %d, register count %d ", stack_size * 8, register_count);
+ }
+ else
+ {
+ printf ("frameless function: stack size %d, register count %d ", stack_size, register_count);
+ }
if (register_count == 0)
{
@@ -591,7 +598,14 @@ print_encoding_x86_64 (struct baton baton, uint8_t *function_start, uint32_t enc
}
- printf (" CFA is rsp+%d ", stack_size * 8);
+ if (mode == UNWIND_X86_64_MODE_STACK_IND)
+ {
+ printf (" CFA is rsp+%d ", stack_size);
+ }
+ else
+ {
+ printf (" CFA is rsp+%d ", stack_size * 8);
+ }
uint32_t saved_registers_offset = 1;
printf (" rip=[CFA-%d]", saved_registers_offset * 8);
@@ -605,24 +619,29 @@ print_encoding_x86_64 (struct baton baton, uint8_t *function_start, uint32_t enc
break;
case UNWIND_X86_64_REG_RBX:
printf (" rbx=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
case UNWIND_X86_64_REG_R12:
printf (" r12=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
case UNWIND_X86_64_REG_R13:
printf (" r13=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
case UNWIND_X86_64_REG_R14:
printf (" r14=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
case UNWIND_X86_64_REG_R15:
printf (" r15=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
case UNWIND_X86_64_REG_RBP:
printf (" rbp=[CFA-%d]", saved_registers_offset * 8);
+ saved_registers_offset++;
break;
}
- saved_registers_offset++;
}
}
@@ -712,7 +731,14 @@ print_encoding_i386 (struct baton baton, uint8_t *function_start, uint32_t encod
printf ("large stack ");
}
- printf ("frameless function: stack size %d, register count %d ", stack_size * 4, register_count);
+ if (mode == UNWIND_X86_MODE_STACK_IND)
+ {
+ printf ("frameless function: stack size %d, register count %d ", stack_size, register_count);
+ }
+ else
+ {
+ printf ("frameless function: stack size %d, register count %d ", stack_size * 4, register_count);
+ }
if (register_count == 0)
{
@@ -808,7 +834,14 @@ print_encoding_i386 (struct baton baton, uint8_t *function_start, uint32_t encod
}
- printf (" CFA is esp+%d ", stack_size * 4);
+ if (mode == UNWIND_X86_MODE_STACK_IND)
+ {
+ printf (" CFA is esp+%d ", stack_size);
+ }
+ else
+ {
+ printf (" CFA is esp+%d ", stack_size * 4);
+ }
uint32_t saved_registers_offset = 1;
printf (" eip=[CFA-%d]", saved_registers_offset * 4);
@@ -822,24 +855,29 @@ print_encoding_i386 (struct baton baton, uint8_t *function_start, uint32_t encod
break;
case UNWIND_X86_REG_EBX:
printf (" ebx=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
case UNWIND_X86_REG_ECX:
printf (" ecx=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
case UNWIND_X86_REG_EDX:
printf (" edx=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
case UNWIND_X86_REG_EDI:
printf (" edi=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
case UNWIND_X86_REG_ESI:
printf (" esi=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
case UNWIND_X86_REG_EBP:
printf (" ebp=[CFA-%d]", saved_registers_offset * 4);
+ saved_registers_offset++;
break;
}
- saved_registers_offset++;
}
}