[Lldb-commits] [PATCH] D103375: [lldb/API] Expose triple for SBProcessInfo.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem created this revision.
brucem added a reviewer: lldb-commits.
brucem requested review of this revision.
Herald added a project: LLDB.

This is present when doing a `platform process list` and is
tracked by the underlying code. To do something like the
process list via the SB API in the future, this must be
exposed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103375

Files:
  lldb/bindings/interface/SBProcessInfo.i
  lldb/include/lldb/API/SBProcessInfo.h
  lldb/source/API/SBProcessInfo.cpp
  lldb/test/API/python_api/process/TestProcessAPI.py


Index: lldb/test/API/python_api/process/TestProcessAPI.py
===
--- lldb/test/API/python_api/process/TestProcessAPI.py
+++ lldb/test/API/python_api/process/TestProcessAPI.py
@@ -356,6 +356,8 @@
 self.assertNotEqual(
 process_info.GetProcessID(), lldb.LLDB_INVALID_PROCESS_ID,
 "Process ID is valid")
+triple = process_info.GetTriple()
+self.assertIsNotNone(triple, "Process has a triple")
 
 # Additional process info varies by platform, so just check that
 # whatever info was retrieved is consistent and nothing blows up.
Index: lldb/source/API/SBProcessInfo.cpp
===
--- lldb/source/API/SBProcessInfo.cpp
+++ lldb/source/API/SBProcessInfo.cpp
@@ -179,6 +179,21 @@
   return proc_id;
 }
 
+const char *SBProcessInfo::GetTriple() {
+  LLDB_RECORD_METHOD_NO_ARGS(const char *, SBProcessInfo, GetTriple);
+
+  const char *triple = nullptr;
+  if (m_opaque_up) {
+const auto &arch = m_opaque_up->GetArchitecture();
+if (arch.IsValid()) {
+  // Const-ify the string so we don't need to worry about the lifetime of
+  // the string
+  triple = ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
+}
+  }
+  return triple;
+}
+
 namespace lldb_private {
 namespace repro {
 
@@ -204,6 +219,7 @@
   LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveUserIDIsValid, ());
   LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveGroupIDIsValid, ());
   LLDB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetParentProcessID, ());
+  LLDB_REGISTER_METHOD(const char *, SBProcessInfo, GetTriple, ());
 }
 
 }
Index: lldb/include/lldb/API/SBProcessInfo.h
===
--- lldb/include/lldb/API/SBProcessInfo.h
+++ lldb/include/lldb/API/SBProcessInfo.h
@@ -50,6 +50,9 @@
 
   lldb::pid_t GetParentProcessID();
 
+  /// Return the target triple (arch-vendor-os) for the described process.
+  const char *GetTriple();
+
 private:
   friend class SBProcess;
 
Index: lldb/bindings/interface/SBProcessInfo.i
===
--- lldb/bindings/interface/SBProcessInfo.i
+++ lldb/bindings/interface/SBProcessInfo.i
@@ -62,6 +62,12 @@
 
 lldb::pid_t
 GetParentProcessID ();
+
+%feature("docstring",
+"Return the target triple (arch-vendor-os) for the described process."
+) GetTriple;
+const char *
+GetTriple ();
 };
 
 } // namespace lldb


Index: lldb/test/API/python_api/process/TestProcessAPI.py
===
--- lldb/test/API/python_api/process/TestProcessAPI.py
+++ lldb/test/API/python_api/process/TestProcessAPI.py
@@ -356,6 +356,8 @@
 self.assertNotEqual(
 process_info.GetProcessID(), lldb.LLDB_INVALID_PROCESS_ID,
 "Process ID is valid")
+triple = process_info.GetTriple()
+self.assertIsNotNone(triple, "Process has a triple")
 
 # Additional process info varies by platform, so just check that
 # whatever info was retrieved is consistent and nothing blows up.
Index: lldb/source/API/SBProcessInfo.cpp
===
--- lldb/source/API/SBProcessInfo.cpp
+++ lldb/source/API/SBProcessInfo.cpp
@@ -179,6 +179,21 @@
   return proc_id;
 }
 
+const char *SBProcessInfo::GetTriple() {
+  LLDB_RECORD_METHOD_NO_ARGS(const char *, SBProcessInfo, GetTriple);
+
+  const char *triple = nullptr;
+  if (m_opaque_up) {
+const auto &arch = m_opaque_up->GetArchitecture();
+if (arch.IsValid()) {
+  // Const-ify the string so we don't need to worry about the lifetime of
+  // the string
+  triple = ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
+}
+  }
+  return triple;
+}
+
 namespace lldb_private {
 namespace repro {
 
@@ -204,6 +219,7 @@
   LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveUserIDIsValid, ());
   LLDB_REGISTER_METHOD(bool, SBProcessInfo, EffectiveGroupIDIsValid, ());
   LLDB_REGISTER_METHOD(lldb::pid_t, SBProcessInfo, GetParentProcessID, ());
+  LLDB_REGISTER_METHOD(const char *, SBProcessInfo, GetTriple, ());
 }
 
 }
Index: lldb/include/lldb/API/SBProcessInfo.h
===
--- lldb/inc

[Lldb-commits] [PATCH] D103375: [lldb/API] Expose triple for SBProcessInfo.

2021-05-30 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added inline comments.



Comment at: lldb/source/API/SBProcessInfo.cpp:191
+  // the string
+  triple = ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
+}

You need to 'instrument' these functions. there is a tool called `lldb-instr` 
you can build withint LLDB and you can run that over the file to generate the 
macro stuff for you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103375/new/

https://reviews.llvm.org/D103375

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D103375: [lldb/API] Expose triple for SBProcessInfo.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem added inline comments.



Comment at: lldb/source/API/SBProcessInfo.cpp:191
+  // the string
+  triple = ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
+}

teemperor wrote:
> You need to 'instrument' these functions. there is a tool called `lldb-instr` 
> you can build withint LLDB and you can run that over the file to generate the 
> macro stuff for you.
This has the `LLDB_RECORD_METHOD_NO_ARGS` already and is the same as the other 
methods in this file. (And it calls `LLDB_REGISTER_METHOD` as well...)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103375/new/

https://reviews.llvm.org/D103375

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D103375: [lldb/API] Expose triple for SBProcessInfo.

2021-05-30 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added inline comments.



Comment at: lldb/source/API/SBProcessInfo.cpp:191
+  // the string
+  triple = ConstString(arch.GetTriple().getTriple().c_str()).GetCString();
+}

brucem wrote:
> teemperor wrote:
> > You need to 'instrument' these functions. there is a tool called 
> > `lldb-instr` you can build withint LLDB and you can run that over the file 
> > to generate the macro stuff for you.
> This has the `LLDB_RECORD_METHOD_NO_ARGS` already and is the same as the 
> other methods in this file. (And it calls `LLDB_REGISTER_METHOD` as well...)
My bad, I thought that we needed to put `const char *` inside a 
`LLDB_RECORD_RESULT` but apparently that's not the case (at least lldb-instr 
says it's not the case).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103375/new/

https://reviews.llvm.org/D103375

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem created this revision.
Herald added a reviewer: shafik.
brucem requested review of this revision.
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103381

Files:
  lldb/docs/design/overview.rst
  lldb/docs/resources/test.rst
  lldb/docs/status/projects.rst
  lldb/docs/use/python-reference.rst
  lldb/examples/python/process_events.py
  lldb/include/lldb/Core/Debugger.h
  lldb/source/API/SBDebugger.cpp
  lldb/source/Core/ValueObject.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
  lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
  lldb/unittests/Symbol/TestClangASTImporter.cpp

Index: lldb/unittests/Symbol/TestClangASTImporter.cpp
===
--- lldb/unittests/Symbol/TestClangASTImporter.cpp
+++ lldb/unittests/Symbol/TestClangASTImporter.cpp
@@ -93,7 +93,7 @@
   clang_utils::SourceASTWithRecord source_with_definition;
 
   // Create an AST with a type thst is only a forward declaration with the
-  // same name as the one in the the other source.
+  // same name as the one in the other source.
   std::unique_ptr fwd_decl_source = clang_utils::createAST();
   CompilerType fwd_decl_type = clang_utils::createRecord(
   *fwd_decl_source, source_with_definition.record_decl->getName());
Index: lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
===
--- lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
+++ lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
@@ -16,7 +16,7 @@
 self.expect_expr("base_ptr_to_derived->getPtr()", result_type="Base *")
 self.expect_expr("base.getPtr()", result_type="Base *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getRef()", result_type="Derived")
 self.expect_expr("base_ptr_to_derived->getRef()", result_type="Base")
 self.expect_expr("base.getRef()", result_type="Base")
@@ -26,7 +26,7 @@
 self.expect_expr("base_ptr_to_derived->getOtherPtr()", result_type="OtherBase *")
 self.expect_expr("base.getOtherPtr()", result_type="OtherBase *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getOtherRef()", result_type="OtherDerived")
 self.expect_expr("base_ptr_to_derived->getOtherRef()", result_type="OtherBase")
 self.expect_expr("base.getOtherRef()", result_type="OtherBase")
Index: lldb/test/API/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -137,7 +137,7 @@
 self.assertEqual(member.signed, value_matches[idx], "Value matches for %d"%(idx))
 
 def test_api(self):
-"""Test the the SBTypeEnumMember API's work correctly for enum_test_days"""
+"""Test that the SBTypeEnumMember API's work correctly for enum_test_days"""
 self.build()
 target = lldbutil.run_to_breakpoint_make_target(self)
 
Index: lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
===
--- lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
+++ lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
@@ -24,13 +24,13 @@
 # Test recursive function call.
 self.expect_expr("fib(5)", result_type="unsigned int", result_value="5")
 
-# Test function with more than one paramter
+# Test function with more than one parameter
 self.expect_expr("add(4, 8)", result_type="int", result_value="12")
 
-# Test nesting function calls in function paramters
+# Test nesting function calls in function parameters
 self.expect_expr("add(add(5,2),add(3,4))", result_type="int", result_value="14")
 self.expect_expr("add(add(5,2),fib(5))", result_type="int", result_value="12")
 
-# Test function with pointer paramter
+# Test function with pointer parameter
 self.expect_expr('stringCompare((c

[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

LGTM but could you split out the non-NFC change (and then you can also mark 
this whole commit as NFC). I'm just going to accept this module that change.




Comment at: lldb/source/API/SBDebugger.cpp:164
  uint64_t &total,
- bool &is_debugger_specific) {
+ bool &is_debugger_specific) 
{LLDB_RECORD_STATIC_METHOD(const char *, SBDebugger, GetProgressFromEvent, 
(const lldb::SBEvent &, uint64_t &, uint64_t &, uint64_t &, bool &), event, 
progress_id, completed, total, is_debugger_specific);
+

Can you clang-format and move this into its own patch (it's not really a NFC 
typo).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D102942: Remove or use variables which are unused but set.

2021-05-30 Thread Roman Lebedev via Phabricator via lldb-commits
lebedev.ri resigned from this revision.
lebedev.ri added a comment.

(removing from my queue - i don't expect to provide any review here)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102942/new/

https://reviews.llvm.org/D102942

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem updated this revision to Diff 348713.
brucem added a comment.

Remove incorrect change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

Files:
  lldb/docs/design/overview.rst
  lldb/docs/resources/test.rst
  lldb/docs/status/projects.rst
  lldb/docs/use/python-reference.rst
  lldb/examples/python/process_events.py
  lldb/include/lldb/Core/Debugger.h
  lldb/source/API/SBDebugger.cpp
  lldb/source/Core/ValueObject.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
  lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
  lldb/unittests/Symbol/TestClangASTImporter.cpp

Index: lldb/unittests/Symbol/TestClangASTImporter.cpp
===
--- lldb/unittests/Symbol/TestClangASTImporter.cpp
+++ lldb/unittests/Symbol/TestClangASTImporter.cpp
@@ -93,7 +93,7 @@
   clang_utils::SourceASTWithRecord source_with_definition;
 
   // Create an AST with a type thst is only a forward declaration with the
-  // same name as the one in the the other source.
+  // same name as the one in the other source.
   std::unique_ptr fwd_decl_source = clang_utils::createAST();
   CompilerType fwd_decl_type = clang_utils::createRecord(
   *fwd_decl_source, source_with_definition.record_decl->getName());
Index: lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
===
--- lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
+++ lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
@@ -16,7 +16,7 @@
 self.expect_expr("base_ptr_to_derived->getPtr()", result_type="Base *")
 self.expect_expr("base.getPtr()", result_type="Base *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getRef()", result_type="Derived")
 self.expect_expr("base_ptr_to_derived->getRef()", result_type="Base")
 self.expect_expr("base.getRef()", result_type="Base")
@@ -26,7 +26,7 @@
 self.expect_expr("base_ptr_to_derived->getOtherPtr()", result_type="OtherBase *")
 self.expect_expr("base.getOtherPtr()", result_type="OtherBase *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getOtherRef()", result_type="OtherDerived")
 self.expect_expr("base_ptr_to_derived->getOtherRef()", result_type="OtherBase")
 self.expect_expr("base.getOtherRef()", result_type="OtherBase")
Index: lldb/test/API/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -137,7 +137,7 @@
 self.assertEqual(member.signed, value_matches[idx], "Value matches for %d"%(idx))
 
 def test_api(self):
-"""Test the the SBTypeEnumMember API's work correctly for enum_test_days"""
+"""Test that the SBTypeEnumMember API's work correctly for enum_test_days"""
 self.build()
 target = lldbutil.run_to_breakpoint_make_target(self)
 
Index: lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
===
--- lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
+++ lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
@@ -24,13 +24,13 @@
 # Test recursive function call.
 self.expect_expr("fib(5)", result_type="unsigned int", result_value="5")
 
-# Test function with more than one paramter
+# Test function with more than one parameter
 self.expect_expr("add(4, 8)", result_type="int", result_value="12")
 
-# Test nesting function calls in function paramters
+# Test nesting function calls in function parameters
 self.expect_expr("add(add(5,2),add(3,4))", result_type="int", result_value="14")
 self.expect_expr("add(add(5,2),fib(5))", result_type="int", result_value="12")
 
-# Test function with pointer paramter
+# Test function with pointer parameter
 self.e

[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem updated this revision to Diff 348714.
brucem added a comment.

Mark as NFC.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

Files:
  lldb/docs/design/overview.rst
  lldb/docs/resources/test.rst
  lldb/docs/status/projects.rst
  lldb/docs/use/python-reference.rst
  lldb/examples/python/process_events.py
  lldb/include/lldb/Core/Debugger.h
  lldb/source/API/SBDebugger.cpp
  lldb/source/Core/ValueObject.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
  lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
  lldb/unittests/Symbol/TestClangASTImporter.cpp

Index: lldb/unittests/Symbol/TestClangASTImporter.cpp
===
--- lldb/unittests/Symbol/TestClangASTImporter.cpp
+++ lldb/unittests/Symbol/TestClangASTImporter.cpp
@@ -93,7 +93,7 @@
   clang_utils::SourceASTWithRecord source_with_definition;
 
   // Create an AST with a type thst is only a forward declaration with the
-  // same name as the one in the the other source.
+  // same name as the one in the other source.
   std::unique_ptr fwd_decl_source = clang_utils::createAST();
   CompilerType fwd_decl_type = clang_utils::createRecord(
   *fwd_decl_source, source_with_definition.record_decl->getName());
Index: lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
===
--- lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
+++ lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
@@ -16,7 +16,7 @@
 self.expect_expr("base_ptr_to_derived->getPtr()", result_type="Base *")
 self.expect_expr("base.getPtr()", result_type="Base *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getRef()", result_type="Derived")
 self.expect_expr("base_ptr_to_derived->getRef()", result_type="Base")
 self.expect_expr("base.getRef()", result_type="Base")
@@ -26,7 +26,7 @@
 self.expect_expr("base_ptr_to_derived->getOtherPtr()", result_type="OtherBase *")
 self.expect_expr("base.getOtherPtr()", result_type="OtherBase *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getOtherRef()", result_type="OtherDerived")
 self.expect_expr("base_ptr_to_derived->getOtherRef()", result_type="OtherBase")
 self.expect_expr("base.getOtherRef()", result_type="OtherBase")
Index: lldb/test/API/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -137,7 +137,7 @@
 self.assertEqual(member.signed, value_matches[idx], "Value matches for %d"%(idx))
 
 def test_api(self):
-"""Test the the SBTypeEnumMember API's work correctly for enum_test_days"""
+"""Test that the SBTypeEnumMember API's work correctly for enum_test_days"""
 self.build()
 target = lldbutil.run_to_breakpoint_make_target(self)
 
Index: lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
===
--- lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
+++ lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
@@ -24,13 +24,13 @@
 # Test recursive function call.
 self.expect_expr("fib(5)", result_type="unsigned int", result_value="5")
 
-# Test function with more than one paramter
+# Test function with more than one parameter
 self.expect_expr("add(4, 8)", result_type="int", result_value="12")
 
-# Test nesting function calls in function paramters
+# Test nesting function calls in function parameters
 self.expect_expr("add(add(5,2),add(3,4))", result_type="int", result_value="14")
 self.expect_expr("add(add(5,2),fib(5))", result_type="int", result_value="12")
 
-# Test function with pointer paramter
+# Test function with pointer parameter
 self.expect_expr('

[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Raphael Isemann via Phabricator via lldb-commits
teemperor added a comment.

I assume you don't have requested commit access yet (?) so I'm going to land 
this for you. Thanks for the patch!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 36597e4 - [lldb] Fix typos. NFC.

2021-05-30 Thread Bruce Mitchener via lldb-commits

Author: Bruce Mitchener
Date: 2021-05-31T06:48:57+07:00
New Revision: 36597e4719e9de6d374f7953aad83234d42ca181

URL: 
https://github.com/llvm/llvm-project/commit/36597e4719e9de6d374f7953aad83234d42ca181
DIFF: 
https://github.com/llvm/llvm-project/commit/36597e4719e9de6d374f7953aad83234d42ca181.diff

LOG: [lldb] Fix typos. NFC.

Differential Revision: https://reviews.llvm.org/D103381

Added: 


Modified: 
lldb/docs/design/overview.rst
lldb/docs/resources/test.rst
lldb/docs/status/projects.rst
lldb/docs/use/python-reference.rst
lldb/examples/python/process_events.py
lldb/include/lldb/Core/Debugger.h
lldb/source/API/SBDebugger.cpp
lldb/source/Core/ValueObject.cpp

lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h

lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
lldb/test/API/lang/c/enum_types/TestEnumTypes.py
lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
lldb/unittests/Symbol/TestClangASTImporter.cpp

Removed: 




diff  --git a/lldb/docs/design/overview.rst b/lldb/docs/design/overview.rst
index af98658c401de..06f8370c613ba 100644
--- a/lldb/docs/design/overview.rst
+++ b/lldb/docs/design/overview.rst
@@ -172,7 +172,7 @@ Utility
 
 This module contains the lowest layers of LLDB. A lot of these classes don't
 really have anything to do with debugging -- they are just there because the
-higher layers of the debugger use these clasess to implement their
+higher layers of the debugger use these classes to implement their
 functionality. Others are data structures used in many other parts of the
 debugger (TraceOptions). Most of the functionality in this module could be
 useful in an application that is not a debugger; however, providing a general

diff  --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index b50b7b2c73b3e..d2830bc53c1f0 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -80,7 +80,7 @@ operating systems.
 
 Finally, the shell tests always run in batch mode. You start with some input
 and the test verifies the output. The debugger can be sensitive to its
-environment, such as the the platform it runs on. It can be hard to express
+environment, such as the platform it runs on. It can be hard to express
 that the same test might behave slightly 
diff erently on macOS and Linux.
 Additionally, the debugger is an interactive tool, and the shell test provide
 no good way of testing those interactive aspects, such as tab completion for

diff  --git a/lldb/docs/status/projects.rst b/lldb/docs/status/projects.rst
index 48081da595789..245654dd2ae44 100644
--- a/lldb/docs/status/projects.rst
+++ b/lldb/docs/status/projects.rst
@@ -253,7 +253,7 @@ Use instruction emulation to reduce the overhead for 
breakpoints
 At present, breakpoints are implemented by inserting a trap instruction, then
 when the trap is hit, replace the trap with the actual instruction and single
 step. Then swap back and continue. This causes problems for read only text, and
-also means that no-stop debugging ust either stop all threads briefly to handle
+also means that no-stop debugging must either stop all threads briefly to 
handle
 this two-step or risk missing some breakpoint hits. If you emulated the
 instruction and wrote back the results, you wouldn't have these problems, and
 it would also save a stop per breakpoint hit. Since we use breakpoints to

diff  --git a/lldb/docs/use/python-reference.rst 
b/lldb/docs/use/python-reference.rst
index 75d9ea1164ed6..0c44d5ada84a0 100644
--- a/lldb/docs/use/python-reference.rst
+++ b/lldb/docs/use/python-reference.rst
@@ -315,8 +315,8 @@ a stop for the recursion. For instance, if you request a 
Module depth search,
 then the callback will be called for each Module as it gets added to the
 Target, but the searcher will not recurse into the Compile Units in the module.
 
-One other slight sublety is that the depth at which you get called back is not
-necessarily the depth at which the the SearchFilter is specified. For instance,
+One other slight subtlety is that the depth at which you get called back is not
+necessarily the depth at which the SearchFilter is specified. For instance,
 if you are doing symbol searches, it is convenient to use the Module depth for
 the search, since symbols are stored in the module. But the SearchFilter might
 specify some subset of CompileUnits, so not all the symbols you might find in

diff  --git a/lldb/examples/python/process_events.py 
b/lldb/examples/python/process_events.py
index 3a1391c4476f2..cb4bf788119d2 100755
--- a/lldb/examples/python/process_events.py
+++ b/lldb/examples/python/process_events.py
@@ -199,7 +199,7 @@ def main(argv):

[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG36597e4719e9: [lldb] Fix typos. NFC. (authored by brucem).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

Files:
  lldb/docs/design/overview.rst
  lldb/docs/resources/test.rst
  lldb/docs/status/projects.rst
  lldb/docs/use/python-reference.rst
  lldb/examples/python/process_events.py
  lldb/include/lldb/Core/Debugger.h
  lldb/source/API/SBDebugger.cpp
  lldb/source/Core/ValueObject.cpp
  
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
  lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
  lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h
  lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
  lldb/test/API/lang/c/enum_types/TestEnumTypes.py
  lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
  lldb/unittests/Symbol/TestClangASTImporter.cpp

Index: lldb/unittests/Symbol/TestClangASTImporter.cpp
===
--- lldb/unittests/Symbol/TestClangASTImporter.cpp
+++ lldb/unittests/Symbol/TestClangASTImporter.cpp
@@ -93,7 +93,7 @@
   clang_utils::SourceASTWithRecord source_with_definition;
 
   // Create an AST with a type thst is only a forward declaration with the
-  // same name as the one in the the other source.
+  // same name as the one in the other source.
   std::unique_ptr fwd_decl_source = clang_utils::createAST();
   CompilerType fwd_decl_type = clang_utils::createRecord(
   *fwd_decl_source, source_with_definition.record_decl->getName());
Index: lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
===
--- lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
+++ lldb/test/API/lang/cpp/covariant-return-types/TestCovariantReturnTypes.py
@@ -16,7 +16,7 @@
 self.expect_expr("base_ptr_to_derived->getPtr()", result_type="Base *")
 self.expect_expr("base.getPtr()", result_type="Base *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getRef()", result_type="Derived")
 self.expect_expr("base_ptr_to_derived->getRef()", result_type="Base")
 self.expect_expr("base.getRef()", result_type="Base")
@@ -26,7 +26,7 @@
 self.expect_expr("base_ptr_to_derived->getOtherPtr()", result_type="OtherBase *")
 self.expect_expr("base.getOtherPtr()", result_type="OtherBase *")
 # The same tests with reference types. LLDB drops the reference when it turns the
-# result into a SBValue so check for the the underlying type of the result.
+# result into a SBValue so check for the underlying type of the result.
 self.expect_expr("derived.getOtherRef()", result_type="OtherDerived")
 self.expect_expr("base_ptr_to_derived->getOtherRef()", result_type="OtherBase")
 self.expect_expr("base.getOtherRef()", result_type="OtherBase")
Index: lldb/test/API/lang/c/enum_types/TestEnumTypes.py
===
--- lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -137,7 +137,7 @@
 self.assertEqual(member.signed, value_matches[idx], "Value matches for %d"%(idx))
 
 def test_api(self):
-"""Test the the SBTypeEnumMember API's work correctly for enum_test_days"""
+"""Test that the SBTypeEnumMember API's work correctly for enum_test_days"""
 self.build()
 target = lldbutil.run_to_breakpoint_make_target(self)
 
Index: lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
===
--- lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
+++ lldb/test/API/commands/expression/call-function/TestCallUserDefinedFunction.py
@@ -24,13 +24,13 @@
 # Test recursive function call.
 self.expect_expr("fib(5)", result_type="unsigned int", result_value="5")
 
-# Test function with more than one paramter
+# Test function with more than one parameter
 self.expect_expr("add(4, 8)", result_type="int", result_value="12")
 
-# Test nesting function calls in function paramters
+# Test nesting function calls in function parameters
 self.expect_expr("add(add(5,2),add(3,4))", result_type="int", result_value="14")
 self.expect_expr("add(add(5,2),fib(5))", result_type="int", result_value="12")

[Lldb-commits] [PATCH] D103381: [lldb] Fix typos.

2021-05-30 Thread Bruce Mitchener via Phabricator via lldb-commits
brucem added a comment.

I had requested it and got it a short bit ago. Looks like I landed it 
successfully. Thanks for the review!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103381/new/

https://reviews.llvm.org/D103381

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits