Skip to content

Commit

Permalink
[lldb] Fixed a number of typos
Browse files Browse the repository at this point in the history
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).

Differential revision: https://reviews.llvm.org/D131122
  • Loading branch information
GabrielRavier authored and JDevlieghere committed Sep 13, 2022
1 parent c519751 commit 7240436
Show file tree
Hide file tree
Showing 34 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion lldb/bindings/interface/SBProcess.i
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public:

%feature("autodoc", "
Allocates a block of memory within the process, with size and
access permissions specified in the arguments. The permisssions
access permissions specified in the arguments. The permissions
argument is an or-combination of zero or more of
lldb.ePermissionsWritable, lldb.ePermissionsReadable, and
lldb.ePermissionsExecutable. Returns the address
Expand Down
8 changes: 4 additions & 4 deletions lldb/bindings/interface/SBType.i
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ public:
"Returns the `BasicType` value that is most appropriate to this type.
Returns `eBasicTypeInvalid` if no appropriate `BasicType` was found or this
type is invalid. See the `BasicType` documentation for the language-specific m
aning of each `BasicType` value.
type is invalid. See the `BasicType` documentation for the language-specific
meaning of each `BasicType` value.
**Overload behaviour:** When called with a `BasicType` parameter, the
following behaviour applies:
Expand Down Expand Up @@ -731,8 +731,8 @@ public:
* C: Always returns ``0``.
* C++: If this type is a class template instantiation then this returns the
number of template parameters that were used in this instantiation. This i
cludes both explicit and implicit template parameters.
number of template parameters that were used in this instantiation. This
includes both explicit and implicit template parameters.
* Objective-C: Always returns ``0``.
") GetNumberOfTemplateArguments;
uint32_t
Expand Down
2 changes: 1 addition & 1 deletion lldb/docs/use/python-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ look like:

# Finally, dispose of the debugger you just made.
lldb.SBDebugger.Destroy(debugger)
# Terminate the debug sesssion
# Terminate the debug session
lldb.SBDebugger.Terminate()


Expand Down
2 changes: 1 addition & 1 deletion lldb/examples/python/armv7_cortex_m_target_defintion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#
# USAGE
#
# (lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/armv7_cortex_m_target_defintion.py
# (lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/armv7_cortex_m_target_definition.py
# (lldb) gdb-remote other.baz.com:1234
#
# The target definition file will get used if and only if the
Expand Down
4 changes: 2 additions & 2 deletions lldb/examples/python/lldb_module_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class DumpLineTables:
command_name = "dump-line-tables"
short_decription = "Dumps full paths to compile unit files and optionally all line table files."
short_description = "Dumps full paths to compile unit files and optionally all line table files."
description = 'Dumps all line tables from all compile units for any modules specified as arguments. Specifying the --verbose flag will output address ranges for each line entry.'
usage = "usage: %prog [options] MODULE1 [MODULE2 ...]"
def create_options(self):
Expand All @@ -27,7 +27,7 @@ def create_options(self):
default=False)

def get_short_help(self):
return self.short_decription
return self.short_description

def get_long_help(self):
return self.help_string
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/Debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
/// If a pointer is passed to a std::once_flag, then it will be used to
/// ensure the given warning is only broadcast once.
static void
ReportWarning(std::string messsage,
ReportWarning(std::string message,
llvm::Optional<lldb::user_id_t> debugger_id = llvm::None,
std::once_flag *once = nullptr);

Expand All @@ -427,7 +427,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
/// If a pointer is passed to a std::once_flag, then it will be used to
/// ensure the given error is only broadcast once.
static void
ReportError(std::string messsage,
ReportError(std::string message,
llvm::Optional<lldb::user_id_t> debugger_id = llvm::None,
std::once_flag *once = nullptr);

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/Mangled.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace lldb_private {
///
/// Designed to handle mangled names. The demangled version of any names will
/// be computed when the demangled name is accessed through the Demangled()
/// acccessor. This class can also tokenize the demangled version of the name
/// accessor. This class can also tokenize the demangled version of the name
/// for powerful searches. Functions and symbols could make instances of this
/// class for their mangled names. Uniqued string pools are used for the
/// mangled, demangled, and token string values to allow for faster
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Symbol/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Type : public std::enable_shared_from_this<Type>, public UserID {

/// GetModule may return module for compile unit's object file.
/// GetExeModule returns module for executable object file that contains
/// compile unit where type was actualy defined.
/// compile unit where type was actually defined.
/// GetModule and GetExeModule may return the same value.
lldb::ModuleSP GetExeModule();

Expand Down
2 changes: 1 addition & 1 deletion lldb/packages/Python/lldbsuite/test/lldbbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class Stopwatch(object):
"""Stopwatch provides a simple utility to start/stop your stopwatch multiple
times. Each start/stop is equal to a lap, with its elapsed time accumulated
while measurment is in progress.
while measurement is in progress.
When you're ready to start from scratch for another round of measurements,
be sure to call the reset() method.
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Core/DynamicLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ DynamicLoader *DynamicLoader::FindPlugin(Process *process,

DynamicLoader::DynamicLoader(Process *process) : m_process(process) {}

// Accessosors to the global setting as to whether to stop at image (shared
// Accessors to the global setting as to whether to stop at image (shared
// library) loading/unloading.

bool DynamicLoader::GetStopWhenImagesChange() const {
Expand Down
10 changes: 5 additions & 5 deletions lldb/source/Core/IOHandlerCursesGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3112,11 +3112,11 @@ class TargetCreateFormDelegate : public FormDelegate {
static constexpr const char *kLoadDependentFilesExecOnly = "Executable only";

std::vector<std::string> GetLoadDependentFilesChoices() {
std::vector<std::string> load_depentents_options;
load_depentents_options.push_back(kLoadDependentFilesExecOnly);
load_depentents_options.push_back(kLoadDependentFilesYes);
load_depentents_options.push_back(kLoadDependentFilesNo);
return load_depentents_options;
std::vector<std::string> load_dependents_options;
load_dependents_options.push_back(kLoadDependentFilesExecOnly);
load_dependents_options.push_back(kLoadDependentFilesYes);
load_dependents_options.push_back(kLoadDependentFilesNo);
return load_dependents_options;
}

LoadDependentFiles GetLoadDependentFiles() {
Expand Down
6 changes: 3 additions & 3 deletions lldb/source/Expression/DWARFExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ bool DWARFExpression::LinkThreadLocalStorage(
// by a file address on the stack. We assume that DW_OP_const4u or
// DW_OP_const8u is used for these values, and we check that the last
// opcode we got before either of these was DW_OP_const4u or
// DW_OP_const8u. If so, then we can link the value accodingly. For
// DW_OP_const8u. If so, then we can link the value accordingly. For
// Darwin, the value in the DW_OP_const4u or DW_OP_const8u is the file
// address of a structure that contains a function pointer, the pthread
// key and the offset into the data pointed to by the pthread key. So we
Expand Down Expand Up @@ -735,7 +735,7 @@ void UpdateValueTypeFromLocationDescription(Log *log, const DWARFUnit *dwarf_cu,
Value *value = nullptr) {
// Note that this function is conflating DWARF expressions with
// DWARF location descriptions. Perhaps it would be better to define
// a wrapper for DWARFExpresssion::Eval() that deals with DWARF
// a wrapper for DWARFExpression::Eval() that deals with DWARF
// location descriptions (which consist of one or more DWARF
// expressions). But doing this would mean we'd also need factor the
// handling of DW_OP_(bit_)piece out of this function.
Expand Down Expand Up @@ -773,7 +773,7 @@ void UpdateValueTypeFromLocationDescription(Log *log, const DWARFUnit *dwarf_cu,
/// \param dw_op_type C-style string used to vary the error output
/// \param file_addr the file address we are trying to resolve and turn into a
/// load address
/// \param so_addr out parameter, will be set to load addresss or section offset
/// \param so_addr out parameter, will be set to load address or section offset
/// \param check_sectionoffset bool which determines if having a section offset
/// but not a load address is considerd a success
/// \returns llvm::Optional containing the load address if resolving and getting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ ModuleSP DynamicLoaderPOSIXDYLD::LoadModuleAtAddress(const FileSpec &file,
// (e.g. com.example.myapplication) instead of the main process binary
// (/system/bin/app_process(32)). The logic is not sound in general (it
// assumes base_addr is the real address, even though it actually is a load
// bias), but it happens to work on adroid because app_process has a file
// bias), but it happens to work on android because app_process has a file
// address of zero.
// This should be removed after we drop support for android-23.
if (m_process->GetTarget().GetArchitecture().GetTriple().isAndroid()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ void ClangExpressionDeclMap::AddOneFunction(NameSearchContext &context,
// We failed to copy the type we found
LLDB_LOG(log,
" Failed to import the function type '{0}' ({1:x})"
" into the expression parser AST contenxt",
" into the expression parser AST context",
function_type->GetName(), function_type->GetID());

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ size_t PlatformRemoteGDBServer::ConnectToWaitingProcesses(Debugger &debugger,
for (size_t i = 0; i < connection_urls.size(); ++i) {
ConnectProcess(connection_urls[i].c_str(), "gdb-remote", debugger, nullptr, error);
if (error.Fail())
return i; // We already connected to i process succsessfully
return i; // We already connected to i process successfully
}
return connection_urls.size();
}
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,8 +949,8 @@ void ProcessGDBRemote::DidLaunchOrAttach(ArchSpec &process_arch) {
process_arch.GetTriple().getTriple());
}

if (int addresssable_bits = m_gdb_comm.GetAddressingBits()) {
lldb::addr_t address_mask = ~((1ULL << addresssable_bits) - 1);
if (int addressable_bits = m_gdb_comm.GetAddressingBits()) {
lldb::addr_t address_mask = ~((1ULL << addressable_bits) - 1);
SetCodeAddressMask(address_mask);
SetDataAddressMask(address_mask);
}
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ std::vector<const minidump::Module *> MinidumpParser::GetFilteredModuleList() {

// Create memory regions from the linux maps only. We do this to avoid issues
// with breakpad generated minidumps where if someone has mmap'ed a shared
// library into memory to accesss its data in the object file, we can get a
// library into memory to access its data in the object file, we can get a
// minidump with two mappings for a binary: one whose base image points to a
// memory region that is read + execute and one that is read only.
MemoryRegionInfos linux_regions;
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Process/scripted/ScriptedThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ bool ScriptedThread::LoadArtificialStackFrames() {
llvm::Twine(
"StackFrame array size (" + llvm::Twine(arr_size) +
llvm::Twine(
") is greater than maximum autorized for a StackFrameList."))
") is greater than maximum authorized for a StackFrameList."))
.str(),
error, LLDBLog::Thread);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ size_t SymbolFileBreakpad::ParseBlocksRecursive(Function &func) {
ParseInlineOriginRecords();
// A vector of current each level's parent block. For example, when parsing
// "INLINE 0 ...", the current level is 0 and its parent block is the
// funciton block at index 0.
// function block at index 0.
std::vector<Block *> blocks;
Block &block = func.GetBlock(false);
block.AddRange(Block::Range(0, func.GetAddressRange().GetByteSize()));
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ lldb::TypeSP PDBASTParser::CreateLLDBTypeFromPDBType(const PDBSymbol &type) {
if (TypeSystemClang::StartTagDeclarationDefinition(element_ast_type)) {
TypeSystemClang::CompleteTagDeclarationDefinition(element_ast_type);
} else {
// We are not able to start defintion.
// We are not able to start definition.
return nullptr;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,7 @@ SymbolFilePDB::GetMangledForPDBFunc(const llvm::pdb::PDBSymbolFunc &pdb_func) {
if (!func_decorated_name.empty()) {
mangled.SetMangledName(ConstString(func_decorated_name));

// For MSVC, format of C funciton's decorated name depends on calling
// For MSVC, format of C function's decorated name depends on calling
// convention. Unfortunately none of the format is recognized by current
// LLDB. For example, `_purecall` is a __cdecl C function. From PDB,
// `__purecall` is retrieved as both its decorated and undecorated name
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Symbol/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void Type::GetDescription(Stream *s, lldb::DescriptionLevel level,
}
}

// Call the get byte size accesor so we resolve our byte size
// Call the get byte size accessor so we resolve our byte size
if (GetByteSize(exe_scope))
s->Printf(", byte-size = %" PRIu64, m_byte_size);
bool show_fullpaths = (level == lldb::eDescriptionLevelVerbose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct A {
struct B {
// When we import the all the FieldDecl we need to check if we have an
// ArrayType and then check if the ElementType is a RecordDecl and if so
// import the defintion. Otherwise during codegen we will attempt to layout A
// import the definition. Otherwise during codegen we will attempt to layout A
// but won't be able to.
A s1[2];
A s2[2][2][3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_asm_int_3(self):
thread, "Unable to find thread stopped at the __debugbreak()")
frame = thread.GetFrameAtIndex(0)

# We should be in funciton 'bar'.
# We should be in function 'bar'.
self.assertTrue(frame.IsValid())
function_name = frame.GetFunctionName()
self.assertIn('bar', function_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def run_load_unload(self):
# The breakpoint should have a hit count of 1.
lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)

# Issue the 'continue' command. We should stop agaian at a_function.
# Issue the 'continue' command. We should stop again at a_function.
# The stop reason of the thread should be breakpoint and at a_function.
self.runCmd("continue")

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/memory/tag/TestMemoryTag.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_memory_tag_read_unsupported(self):
self.runCmd("run", RUN_SUCCEEDED)

# If you're on AArch64 you could have MTE but the remote process
# must also support it. If you're on any other arhcitecture you
# must also support it. If you're on any other architecture you
# won't have any tagging at all. So the error message is different.
if self.isAArch64():
expected = "error: Process does not support memory tagging"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test(self):
"""
exe = self.getBuildArtifact("a.out")

# Create a module with no depedencies.
# Create a module with no dependencies.
target = self.createTestTarget(load_dependent_modules=False)

self.runCmd('breakpoint set -f a.c -l %d' % (self.line_a))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test(self):
"""
exe = self.getBuildArtifact("a.out")

# Create a module with no depedencies.
# Create a module with no dependencies.
target = self.createTestTarget(load_dependent_modules=False)

# Get the executable module and get the number of symbols to make
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test(self):
exe = self.getBuildArtifact(exe_basename)
self.yaml2obj(yaml_path, exe)
self.assertTrue(os.path.exists(exe))
# Create a module with no depedencies.
# Create a module with no dependencies.
self.runCmd('target create -d --arch x86_64 %s' % (exe))
self.runCmd('image dump symtab %s' % (exe_basename))
self.runCmd('target create -d --arch arm64 %s' % (exe))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def test_aarch64_sve_regs_full(self):

@skipIfLLVMTargetMissing("AArch64")
def test_aarch64_pac_regs(self):
# Test AArch64/Linux Pointer Authenication register read
# Test AArch64/Linux Pointer Authentication register read
target = self.dbg.CreateTarget(None)
self.assertTrue(target, VALID_TARGET)
process = target.LoadCore("linux-aarch64-pac.core")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# The binary should have debug symbols because stack unwinding doesn't work
# correctly using the information in the Minidump only. Also we want to evaluate
# local variables, etc.
# Breakpad compiles as a static library, so statically linking againts it
# Breakpad compiles as a static library, so statically linking against it
# makes the binary huge.
# Dynamically linking to it does improve things, but we are still #include-ing
# breakpad headers (which is a lot of source code for which we generate debug
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/debugserver/source/DNBTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DNBTimer {
PTHREAD_MUTEX_LOCKER(locker, m_mutexAP.get());
gettimeofday(&m_timeval, NULL);
}
// Get the total mircoseconds since Jan 1, 1970
// Get the total microseconds since Jan 1, 1970
uint64_t TotalMicroSeconds() const {
PTHREAD_MUTEX_LOCKER(locker, m_mutexAP.get());
return (uint64_t)(m_timeval.tv_sec) * 1000000ull +
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/debugserver/source/JSON.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class JSONNumber : public JSONValue {
public:
typedef std::shared_ptr<JSONNumber> SP;

// We cretae a constructor for all integer and floating point type with using
// We create a constructor for all integer and floating point type with using
// templates and
// SFINAE to avoid having ambiguous overloads because of the implicit type
// promotion. If we
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/debugserver/source/MacOSX/Genealogy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void Genealogy::GetActivities(pid_t pid, const MachThreadList &thread_list,
return true;
});

// Collect all the Activites
// Collect all the Activities
m_os_activity_iterate_activities(
process_info->activities, process_info,
^bool(os_activity_entry_t activity) {
Expand Down

0 comments on commit 7240436

Please sign in to comment.