Skip to content

Commit fc75200

Browse files
committed
fixup: format code
1 parent 39731df commit fc75200

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

libunwind/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ set(LIBUNWIND_HEADERS
3636
AddressSpace.hpp
3737
assembly.h
3838
CompactUnwinder.hpp
39-
shadow_stack_unwind.h
4039
config.h
4140
dwarf2.h
4241
DwarfInstructions.hpp
@@ -46,6 +45,7 @@ set(LIBUNWIND_HEADERS
4645
libunwind_ext.h
4746
Registers.hpp
4847
RWMutex.hpp
48+
shadow_stack_unwind.h
4949
Unwind-EHABI.h
5050
UnwindCursor.hpp
5151
../include/libunwind.h

libunwind/src/Registers.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#include <stdint.h>
1616
#include <string.h>
1717

18-
#include "shadow_stack_unwind.h"
1918
#include "config.h"
2019
#include "libunwind.h"
20+
#include "shadow_stack_unwind.h"
2121

2222
namespace libunwind {
2323

libunwind/src/UnwindLevel1.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
#include <stdio.h>
2626
#include <string.h>
2727

28-
#include "shadow_stack_unwind.h"
2928
#include "config.h"
3029
#include "libunwind.h"
3130
#include "libunwind_ext.h"
31+
#include "shadow_stack_unwind.h"
3232
#include "unwind.h"
3333

3434
#if !defined(_LIBUNWIND_ARM_EHABI) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
@@ -62,7 +62,7 @@
6262
void *ssJumpAddress = __libunwind_ss_get_jump_target(); \
6363
__asm__ volatile("push %%edi\n\t" \
6464
"sub $4, %%esp\n\t" \
65-
"jmp *%%edx\n\t" :: "D"(ssRegContext), \
65+
"jmp *%%edx\n\t" ::"D"(ssRegContext), \
6666
"d"(ssJumpAddress)); \
6767
} while (0)
6868
#elif defined(_LIBUNWIND_TARGET_X86_64)
@@ -72,7 +72,7 @@
7272
_LIBUNWIND_POP_SS_SSP((fn)); \
7373
void *ssRegContext = __libunwind_ss_get_registers((cursor)); \
7474
void *ssJumpAddress = __libunwind_ss_get_jump_target(); \
75-
__asm__ volatile("jmpq *%%rdx\n\t" :: "D"(ssRegContext), \
75+
__asm__ volatile("jmpq *%%rdx\n\t" ::"D"(ssRegContext), \
7676
"d"(ssJumpAddress)); \
7777
} while (0)
7878
#elif defined(_LIBUNWIND_TARGET_AARCH64)
@@ -266,8 +266,9 @@ unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except
266266
if (shadowStackTop != 0) {
267267
unw_word_t retInNormalStack;
268268
__unw_get_reg(cursor, UNW_REG_IP, &retInNormalStack);
269-
unsigned long retInShadowStack = *(unsigned long *)
270-
(shadowStackTop + __shadow_stack_step_size * framesWalked);
269+
unsigned long retInShadowStack =
270+
*(unsigned long *)(shadowStackTop +
271+
__shadow_stack_step_size * framesWalked);
271272
if (retInNormalStack != retInShadowStack)
272273
return _URC_FATAL_PHASE2_ERROR;
273274
}

0 commit comments

Comments
 (0)