[libunwind] Fixed a number of typos
I went over the output of the following mess of a command: `(ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less)` and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Reviewed By: #libunwind, MaskRay Differential Revision: https://reviews.llvm.org/D130948
This commit is contained in:
parent
1b08b276ae
commit
dad00daa7a
|
@ -242,7 +242,7 @@ texinfo_documents = [
|
||||||
#texinfo_show_urls = 'footnote'
|
#texinfo_show_urls = 'footnote'
|
||||||
|
|
||||||
|
|
||||||
# FIXME: Define intersphinx configration.
|
# FIXME: Define intersphinx configuration.
|
||||||
intersphinx_mapping = {}
|
intersphinx_mapping = {}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// The compact unwind endoding is a 32-bit value which encoded in an
|
// The compact unwind encoding is a 32-bit value which encoded in an
|
||||||
// architecture specific way, which registers to restore from where, and how
|
// architecture specific way, which registers to restore from where, and how
|
||||||
// to unwind out of the function.
|
// to unwind out of the function.
|
||||||
//
|
//
|
||||||
|
@ -116,7 +116,7 @@ enum {
|
||||||
// on the stack immediately after the return address. The stack_size/4 is
|
// on the stack immediately after the return address. The stack_size/4 is
|
||||||
// encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024).
|
// encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024).
|
||||||
// The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT.
|
// The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT.
|
||||||
// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were
|
// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
|
||||||
// saved and their order.
|
// saved and their order.
|
||||||
// UNWIND_X86_MODE_STACK_IND:
|
// UNWIND_X86_MODE_STACK_IND:
|
||||||
// A "frameless" (EBP not used as frame pointer) function large constant
|
// A "frameless" (EBP not used as frame pointer) function large constant
|
||||||
|
@ -250,7 +250,7 @@ enum {
|
||||||
// on the stack immediately after the return address. The stack_size/8 is
|
// on the stack immediately after the return address. The stack_size/8 is
|
||||||
// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).
|
// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048).
|
||||||
// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.
|
// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT.
|
||||||
// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were
|
// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION contains which registers were
|
||||||
// saved and their order.
|
// saved and their order.
|
||||||
// UNWIND_X86_64_MODE_STACK_IND:
|
// UNWIND_X86_64_MODE_STACK_IND:
|
||||||
// A "frameless" (RBP not used as frame pointer) function large constant
|
// A "frameless" (RBP not used as frame pointer) function large constant
|
||||||
|
|
|
@ -93,7 +93,7 @@ extern void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t fc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// The following are semi-suppoted extensions to the C++ ABI
|
// The following are semi-supported extensions to the C++ ABI
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
namespace libunwind {
|
namespace libunwind {
|
||||||
|
|
||||||
|
|
||||||
/// DwarfInstructions maps abtract DWARF unwind instructions to a particular
|
/// DwarfInstructions maps abstract DWARF unwind instructions to a particular
|
||||||
/// architecture
|
/// architecture
|
||||||
template <typename A, typename R>
|
template <typename A, typename R>
|
||||||
class DwarfInstructions {
|
class DwarfInstructions {
|
||||||
|
@ -241,7 +241,7 @@ int DwarfInstructions<A, R>::stepWithDwarf(A &addressSpace, pint_t pc,
|
||||||
return UNW_EBADREG;
|
return UNW_EBADREG;
|
||||||
} else if (i == (int)cieInfo.returnAddressRegister) {
|
} else if (i == (int)cieInfo.returnAddressRegister) {
|
||||||
// Leaf function keeps the return address in register and there is no
|
// Leaf function keeps the return address in register and there is no
|
||||||
// explicit intructions how to restore it.
|
// explicit instructions how to restore it.
|
||||||
returnAddress = registers.getRegister(cieInfo.returnAddressRegister);
|
returnAddress = registers.getRegister(cieInfo.returnAddressRegister);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ int DwarfInstructions<A, R>::stepWithDwarf(A &addressSpace, pint_t pc,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Return address is address after call site instruction, so setting IP to
|
// Return address is address after call site instruction, so setting IP to
|
||||||
// that does simualates a return.
|
// that does simulates a return.
|
||||||
newRegisters.setIP(returnAddress);
|
newRegisters.setIP(returnAddress);
|
||||||
|
|
||||||
// Simulate the step by replacing the register set with the new ones.
|
// Simulate the step by replacing the register set with the new ones.
|
||||||
|
@ -635,7 +635,7 @@ DwarfInstructions<A, R>::evaluateExpression(pint_t expression, A &addressSpace,
|
||||||
svalue = (sint_t)*sp;
|
svalue = (sint_t)*sp;
|
||||||
*sp = (pint_t)(svalue >> value);
|
*sp = (pint_t)(svalue >> value);
|
||||||
if (log)
|
if (log)
|
||||||
fprintf(stderr, "shift left arithmetric\n");
|
fprintf(stderr, "shift left arithmetic\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DW_OP_xor:
|
case DW_OP_xor:
|
||||||
|
|
|
@ -353,7 +353,7 @@ const char *CFI_Parser<A>::parseCIE(A &addressSpace, pint_t cie,
|
||||||
while (addressSpace.get8(p) != 0)
|
while (addressSpace.get8(p) != 0)
|
||||||
++p;
|
++p;
|
||||||
++p;
|
++p;
|
||||||
// parse code aligment factor
|
// parse code alignment factor
|
||||||
cieInfo->codeAlignFactor = (uint32_t)addressSpace.getULEB128(p, cieContentEnd);
|
cieInfo->codeAlignFactor = (uint32_t)addressSpace.getULEB128(p, cieContentEnd);
|
||||||
// parse data alignment factor
|
// parse data alignment factor
|
||||||
cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd);
|
cieInfo->dataAlignFactor = (int)addressSpace.getSLEB128(p, cieContentEnd);
|
||||||
|
@ -407,7 +407,7 @@ const char *CFI_Parser<A>::parseCIE(A &addressSpace, pint_t cie,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// "run" the DWARF instructions and create the abstact PrologInfo for an FDE
|
/// "run" the DWARF instructions and create the abstract PrologInfo for an FDE
|
||||||
template <typename A>
|
template <typename A>
|
||||||
bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
|
bool CFI_Parser<A>::parseFDEInstructions(A &addressSpace,
|
||||||
const FDE_Info &fdeInfo,
|
const FDE_Info &fdeInfo,
|
||||||
|
|
|
@ -4003,7 +4003,7 @@ typedef float fp_t;
|
||||||
# error "Unsupported __riscv_flen"
|
# error "Unsupported __riscv_flen"
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
// This is just for supressing undeclared error of fp_t.
|
// This is just for suppressing undeclared error of fp_t.
|
||||||
typedef double fp_t;
|
typedef double fp_t;
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -235,7 +235,7 @@ decode_eht_entry(const uint32_t* data, size_t* off, size_t* len) {
|
||||||
} else {
|
} else {
|
||||||
// 6.3: ARM Compact Model
|
// 6.3: ARM Compact Model
|
||||||
//
|
//
|
||||||
// EHT entries here correspond to the __aeabi_unwind_cpp_pr[012] PRs indeded
|
// EHT entries here correspond to the __aeabi_unwind_cpp_pr[012] PRs indeed
|
||||||
// by format:
|
// by format:
|
||||||
Descriptor::Format format =
|
Descriptor::Format format =
|
||||||
static_cast<Descriptor::Format>((*data & 0x0f000000) >> 24);
|
static_cast<Descriptor::Format>((*data & 0x0f000000) >> 24);
|
||||||
|
@ -845,7 +845,7 @@ _LIBUNWIND_EXPORT void _Unwind_Complete(_Unwind_Exception* exception_object) {
|
||||||
/// may force a jump to a landing pad in that function, the landing
|
/// may force a jump to a landing pad in that function, the landing
|
||||||
/// pad code may then call _Unwind_Resume() to continue with the
|
/// pad code may then call _Unwind_Resume() to continue with the
|
||||||
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
||||||
/// geneated user code. All other _Unwind_* routines are called
|
/// generated user code. All other _Unwind_* routines are called
|
||||||
/// by the C++ runtime __cxa_* routines.
|
/// by the C++ runtime __cxa_* routines.
|
||||||
///
|
///
|
||||||
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
||||||
|
|
|
@ -137,7 +137,7 @@ _GCC_specific_handler(PEXCEPTION_RECORD ms_exc, PVOID frame, PCONTEXT ms_ctx,
|
||||||
// If we were called by __libunwind_seh_personality(), indicate that
|
// If we were called by __libunwind_seh_personality(), indicate that
|
||||||
// a handler was found; otherwise, initiate phase 2 by unwinding.
|
// a handler was found; otherwise, initiate phase 2 by unwinding.
|
||||||
if (ours && ms_exc->NumberParameters > 1)
|
if (ours && ms_exc->NumberParameters > 1)
|
||||||
return 4 /* ExecptionExecuteHandler in mingw */;
|
return 4 /* ExceptionExecuteHandler in mingw */;
|
||||||
// This should never happen in phase 2.
|
// This should never happen in phase 2.
|
||||||
if (IS_UNWINDING(ms_exc->ExceptionFlags))
|
if (IS_UNWINDING(ms_exc->ExceptionFlags))
|
||||||
_LIBUNWIND_ABORT("Personality indicated exception handler in phase 2!");
|
_LIBUNWIND_ABORT("Personality indicated exception handler in phase 2!");
|
||||||
|
@ -155,7 +155,7 @@ _GCC_specific_handler(PEXCEPTION_RECORD ms_exc, PVOID frame, PCONTEXT ms_ctx,
|
||||||
// a handler was found; otherwise, it's time to initiate a collided
|
// a handler was found; otherwise, it's time to initiate a collided
|
||||||
// unwind to the target.
|
// unwind to the target.
|
||||||
if (ours && !IS_UNWINDING(ms_exc->ExceptionFlags) && ms_exc->NumberParameters > 1)
|
if (ours && !IS_UNWINDING(ms_exc->ExceptionFlags) && ms_exc->NumberParameters > 1)
|
||||||
return 4 /* ExecptionExecuteHandler in mingw */;
|
return 4 /* ExceptionExecuteHandler in mingw */;
|
||||||
// This should never happen in phase 1.
|
// This should never happen in phase 1.
|
||||||
if (!IS_UNWINDING(ms_exc->ExceptionFlags))
|
if (!IS_UNWINDING(ms_exc->ExceptionFlags))
|
||||||
_LIBUNWIND_ABORT("Personality installed context during phase 1!");
|
_LIBUNWIND_ABORT("Personality installed context during phase 1!");
|
||||||
|
@ -354,7 +354,7 @@ _Unwind_RaiseException(_Unwind_Exception *exception_object) {
|
||||||
/// may force a jump to a landing pad in that function; the landing
|
/// may force a jump to a landing pad in that function; the landing
|
||||||
/// pad code may then call \c _Unwind_Resume() to continue with the
|
/// pad code may then call \c _Unwind_Resume() to continue with the
|
||||||
/// unwinding. Note: the call to \c _Unwind_Resume() is from compiler
|
/// unwinding. Note: the call to \c _Unwind_Resume() is from compiler
|
||||||
/// geneated user code. All other \c _Unwind_* routines are called
|
/// generated user code. All other \c _Unwind_* routines are called
|
||||||
/// by the C++ runtime \c __cxa_* routines.
|
/// by the C++ runtime \c __cxa_* routines.
|
||||||
///
|
///
|
||||||
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct _Unwind_FunctionContext {
|
||||||
struct _Unwind_FunctionContext *prev;
|
struct _Unwind_FunctionContext *prev;
|
||||||
|
|
||||||
#if defined(__ve__)
|
#if defined(__ve__)
|
||||||
// VE requires to store 64 bit pointers in the buffer for SjLj execption.
|
// VE requires to store 64 bit pointers in the buffer for SjLj exception.
|
||||||
// We expand the size of values defined here. This size must be matched
|
// We expand the size of values defined here. This size must be matched
|
||||||
// to the size returned by TargetMachine::getSjLjDataSize().
|
// to the size returned by TargetMachine::getSjLjDataSize().
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ _Unwind_SjLj_RaiseException(struct _Unwind_Exception *exception_object) {
|
||||||
/// may force a jump to a landing pad in that function, the landing
|
/// may force a jump to a landing pad in that function, the landing
|
||||||
/// pad code may then call _Unwind_Resume() to continue with the
|
/// pad code may then call _Unwind_Resume() to continue with the
|
||||||
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
||||||
/// geneated user code. All other _Unwind_* routines are called
|
/// generated user code. All other _Unwind_* routines are called
|
||||||
/// by the C++ runtime __cxa_* routines.
|
/// by the C++ runtime __cxa_* routines.
|
||||||
///
|
///
|
||||||
/// Re-throwing an exception is implemented by having the code call
|
/// Re-throwing an exception is implemented by having the code call
|
||||||
|
@ -394,7 +394,7 @@ _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *exception_object) {
|
||||||
// std::terminate()
|
// std::terminate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call through to _Unwind_Resume() which distiguishes between forced and
|
// Call through to _Unwind_Resume() which distinguishes between forced and
|
||||||
// regular exceptions.
|
// regular exceptions.
|
||||||
_Unwind_SjLj_Resume(exception_object);
|
_Unwind_SjLj_Resume(exception_object);
|
||||||
_LIBUNWIND_ABORT("__Unwind_SjLj_Resume_or_Rethrow() called "
|
_LIBUNWIND_ABORT("__Unwind_SjLj_Resume_or_Rethrow() called "
|
||||||
|
|
|
@ -510,7 +510,7 @@ public:
|
||||||
void setDispatcherContext(DISPATCHER_CONTEXT *disp) { _dispContext = *disp; }
|
void setDispatcherContext(DISPATCHER_CONTEXT *disp) { _dispContext = *disp; }
|
||||||
|
|
||||||
// libunwind does not and should not depend on C++ library which means that we
|
// libunwind does not and should not depend on C++ library which means that we
|
||||||
// need our own defition of inline placement new.
|
// need our own definition of inline placement new.
|
||||||
static void *operator new(size_t, UnwindCursor<A, R> *p) { return p; }
|
static void *operator new(size_t, UnwindCursor<A, R> *p) { return p; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -946,7 +946,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// libunwind does not and should not depend on C++ library which means that we
|
// libunwind does not and should not depend on C++ library which means that we
|
||||||
// need our own defition of inline placement new.
|
// need our own definition of inline placement new.
|
||||||
static void *operator new(size_t, UnwindCursor<A, R> *p) { return p; }
|
static void *operator new(size_t, UnwindCursor<A, R> *p) { return p; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -2461,7 +2461,7 @@ int UnwindCursor<A, R>::stepWithTBTable(pint_t pc, tbtable *TBTable,
|
||||||
reinterpret_cast<void *>(pc));
|
reinterpret_cast<void *>(pc));
|
||||||
|
|
||||||
// The return address is the address after call site instruction, so
|
// The return address is the address after call site instruction, so
|
||||||
// setting IP to that simualates a return.
|
// setting IP to that simulates a return.
|
||||||
newRegisters.setIP(reinterpret_cast<uintptr_t>(returnAddress));
|
newRegisters.setIP(reinterpret_cast<uintptr_t>(returnAddress));
|
||||||
|
|
||||||
// Simulate the step by replacing the register set with the new ones.
|
// Simulate the step by replacing the register set with the new ones.
|
||||||
|
|
|
@ -52,7 +52,7 @@ _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
|
||||||
// std::terminate().
|
// std::terminate().
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call through to _Unwind_Resume() which distiguishes between forced and
|
// Call through to _Unwind_Resume() which distinguishes between forced and
|
||||||
// regular exceptions.
|
// regular exceptions.
|
||||||
_Unwind_Resume(exception_object);
|
_Unwind_Resume(exception_object);
|
||||||
_LIBUNWIND_ABORT("_Unwind_Resume_or_Rethrow() called _Unwind_RaiseException()"
|
_LIBUNWIND_ABORT("_Unwind_Resume_or_Rethrow() called _Unwind_RaiseException()"
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
// In exception handing, some stack frames will be skipped before jumping to
|
// In exception handing, some stack frames will be skipped before jumping to
|
||||||
// landing pad and we must adjust CET shadow stack accordingly.
|
// landing pad and we must adjust CET shadow stack accordingly.
|
||||||
// _LIBUNWIND_POP_CET_SSP is used to adjust CET shadow stack pointer and we
|
// _LIBUNWIND_POP_CET_SSP is used to adjust CET shadow stack pointer and we
|
||||||
// directly jump to __libunwind_Registerts_x86/x86_64_jumpto instead of using
|
// directly jump to __libunwind_Registers_x86/x86_64_jumpto instead of using
|
||||||
// a regular function call to avoid pushing to CET shadow stack again.
|
// a regular function call to avoid pushing to CET shadow stack again.
|
||||||
#if !defined(_LIBUNWIND_USE_CET)
|
#if !defined(_LIBUNWIND_USE_CET)
|
||||||
#define __unw_phase2_resume(cursor, fn) \
|
#define __unw_phase2_resume(cursor, fn) \
|
||||||
|
@ -425,7 +425,7 @@ _Unwind_RaiseException(_Unwind_Exception *exception_object) {
|
||||||
/// may force a jump to a landing pad in that function, the landing
|
/// may force a jump to a landing pad in that function, the landing
|
||||||
/// pad code may then call _Unwind_Resume() to continue with the
|
/// pad code may then call _Unwind_Resume() to continue with the
|
||||||
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
/// unwinding. Note: the call to _Unwind_Resume() is from compiler
|
||||||
/// geneated user code. All other _Unwind_* routines are called
|
/// generated user code. All other _Unwind_* routines are called
|
||||||
/// by the C++ runtime __cxa_* routines.
|
/// by the C++ runtime __cxa_* routines.
|
||||||
///
|
///
|
||||||
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
/// Note: re-throwing an exception (as opposed to continuing the unwind)
|
||||||
|
|
|
@ -441,7 +441,7 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind13Registers_ppc6jumptoEv)
|
||||||
// thread_state pointer is in r3
|
// thread_state pointer is in r3
|
||||||
//
|
//
|
||||||
|
|
||||||
// restore integral registerrs
|
// restore integral registers
|
||||||
// skip r0 for now
|
// skip r0 for now
|
||||||
// skip r1 for now
|
// skip r1 for now
|
||||||
lwz 2, 16(3)
|
lwz 2, 16(3)
|
||||||
|
|
|
@ -117,7 +117,7 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum,
|
||||||
AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
|
AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor;
|
||||||
if (co->validReg(regNum)) {
|
if (co->validReg(regNum)) {
|
||||||
co->setReg(regNum, (pint_t)value);
|
co->setReg(regNum, (pint_t)value);
|
||||||
// specical case altering IP to re-find info (being called by personality
|
// special case altering IP to re-find info (being called by personality
|
||||||
// function)
|
// function)
|
||||||
if (regNum == UNW_REG_IP) {
|
if (regNum == UNW_REG_IP) {
|
||||||
unw_proc_info_t info;
|
unw_proc_info_t info;
|
||||||
|
|
|
@ -28,7 +28,8 @@ _Unwind_Reason_Code frame_handler(struct _Unwind_Context* ctx, void* arg) {
|
||||||
(void)arg;
|
(void)arg;
|
||||||
Dl_info info = { 0, 0, 0, 0 };
|
Dl_info info = { 0, 0, 0, 0 };
|
||||||
|
|
||||||
// Unwind util the main is reached, above frames deeped on the platfrom and architecture.
|
// Unwind until the main is reached, above frames deeped on the platform and
|
||||||
|
// architecture.
|
||||||
if (dladdr(reinterpret_cast<void *>(_Unwind_GetIP(ctx)), &info) &&
|
if (dladdr(reinterpret_cast<void *>(_Unwind_GetIP(ctx)), &info) &&
|
||||||
info.dli_sname && !strcmp("main", info.dli_sname)) {
|
info.dli_sname && !strcmp("main", info.dli_sname)) {
|
||||||
_Exit(0);
|
_Exit(0);
|
||||||
|
|
Loading…
Reference in New Issue