[Lldb-commits] [lldb] ef3fade - [lldb] Use mangled symbol name to look for __asan::AsanDie()

2022-02-05 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2022-02-05T09:50:31-08:00
New Revision: ef3fade14b32c20e0a35b8fca30e7d2f20e0c983

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

LOG: [lldb] Use mangled symbol name to look for __asan::AsanDie()

After aed965d we no longer demangle full symbol names while indexing the
symbol table which means we have to use the mangled name instead of the
demangled name to find the symbol for __asan::AsanDie().

This fixes the following two tests:

  lldb-api :: functionalities/asan/TestMemoryHistory.py
  lldb-api :: functionalities/asan/TestReportData.py

Added: 


Modified: 

lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
 
b/lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
index 8d8b5c68e41b3..33b2b5dd51559 100644
--- 
a/lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
+++ 
b/lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
@@ -281,7 +281,7 @@ void InstrumentationRuntimeASan::Activate() {
   if (!process_sp)
 return;
 
-  ConstString symbol_name("__asan::AsanDie()");
+  ConstString symbol_name("_ZN6__asanL7AsanDieEv");
   const Symbol *symbol = GetRuntimeModuleSP()->FindFirstSymbolWithNameAndType(
   symbol_name, eSymbolTypeCode);
 



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


[Lldb-commits] [PATCH] D118395: Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

2022-02-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment.

In D118395#3278431 , @labath wrote:

> Also, if you're running these tests on some kind of a matrix bot, maybe you 
> can just skip all lldb-server tests completely (dotest.py --skip-categories 
> llgs). Given that they don't use debug info, they definitely don't provide 
> any useful signal in these contexts.

That's a great point! I'll change the config to do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118395

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


[Lldb-commits] [PATCH] D118494: [lldb] Observe SG_READ_ONLY flag in MachO binaries

2022-02-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added inline comments.



Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:1436
 result |= ePermissionsReadable;
-  if (seg_cmd.initprot & VM_PROT_WRITE)
+  if ((seg_cmd.initprot & VM_PROT_WRITE) && !(seg_cmd.flags & SG_READ_ONLY))
 result |= ePermissionsWritable;

kastiglione wrote:
> augusto2112 wrote:
> > Could we add a new value in the enumeration? Something like 
> > ePermissionsLinkerWritable? As it is right now this would be dangerous for 
> > the existing file-cache optimization as we'd happily read pointers that are 
> > supposed to be fixed by the linker from the file-cache.
> That works for me. I think we'd want `ePermissionsLoaderWritable`.
That sounds good.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118494

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


[Lldb-commits] [lldb] a701dc8 - Revert "Fixed typos in TestLldbGdbServer.py"

2022-02-05 Thread Adrian Prantl via lldb-commits

Author: Adrian Prantl
Date: 2022-02-05T14:54:37-08:00
New Revision: a701dc8edae6886da0f5b3de793a23d6afeb0a01

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

LOG: Revert "Fixed typos in TestLldbGdbServer.py"

This reverts commit cf93a085754e221f73a2877c946dcb2beb6039d7.

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index 12f3b5886d381..c6ecaf88b1be8 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -1044,7 +1044,7 @@ def test_qSupported_returns_known_stub_features(self):
 self.assertTrue(len(supported_dict) > 0)
 
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<','3'])
+@skipIf(dwarf_version=['<',3'4'])
 def test_qSupported_auvx(self):
 expected = ('+' if lldbplatformutil.getPlatform()
 in ["freebsd", "linux", "netbsd"] else '-')
@@ -1350,7 +1350,7 @@ def test_P_and_p_thread_suffix_work(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
+@skipIf(dwarf_version=['3', '4'])
 def test_launch_via_A(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")
@@ -1377,7 +1377,7 @@ def test_launch_via_A(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<','3'])
+@skipIf(dwarf_version=['<',3'4'])
 def test_launch_via_vRun(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")
@@ -1421,7 +1421,7 @@ def test_launch_via_vRun_no_args(self):
 @skipIfWindows # No pty support to test any inferior output
 @add_test_categories(["llgs"])
 @skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
+@skipIf(dwarf_version=['3', '4'])
 def test_QEnvironment(self):
 self.build()
 exe_path = self.getBuildArtifact("a.out")



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


[Lldb-commits] [lldb] 11d64ed - Revert "Disable TestLldbGdbServer on Dwarf2 and clang versions below 14"

2022-02-05 Thread Adrian Prantl via lldb-commits

Author: Adrian Prantl
Date: 2022-02-05T14:54:41-08:00
New Revision: 11d64edbf92861cc7957cea6dc01fbf11f8c955b

URL: 
https://github.com/llvm/llvm-project/commit/11d64edbf92861cc7957cea6dc01fbf11f8c955b
DIFF: 
https://github.com/llvm/llvm-project/commit/11d64edbf92861cc7957cea6dc01fbf11f8c955b.diff

LOG: Revert "Disable TestLldbGdbServer on Dwarf2 and clang versions below 14"

This reverts commit 867fdec1945df3c1031d3cefdc97903131a3482b.

Added: 


Modified: 
lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

Removed: 




diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py 
b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index c6ecaf88b1be8..18461568c02ce 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -28,8 +28,6 @@ class 
LldbGdbServerTestCase(gdbremote_testcase.GdbRemoteTestCaseBase, DwarfOpcod
 
 mydir = TestBase.compute_mydir(__file__)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_thread_suffix_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -43,8 +41,6 @@ def test_thread_suffix_supported(self):
 self.expect_gdbremote_sequence()
 
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_list_threads_in_stop_reply_supported(self):
 server = self.connect_to_debug_monitor()
 self.assertIsNotNone(server)
@@ -56,8 +52,6 @@ def test_list_threads_in_stop_reply_supported(self):
 True)
 self.expect_gdbremote_sequence()
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_c_packet_works(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -69,8 +63,6 @@ def test_c_packet_works(self):
 self.expect_gdbremote_sequence()
 
 @skipIfWindows # No pty support to test any inferior output
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_inferior_print_exit(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior(
@@ -84,8 +76,6 @@ def test_inferior_print_exit(self):
 context = self.expect_gdbremote_sequence()
 self.assertIsNotNone(context)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_first_launch_stop_reply_thread_matches_first_qC(self):
 self.build()
 procs = self.prep_debug_monitor_and_inferior()
@@ -101,8 +91,6 @@ def 
test_first_launch_stop_reply_thread_matches_first_qC(self):
 context = self.expect_gdbremote_sequence()
 self.assertEqual(context.get("thread_id_QC"), 
context.get("thread_id_?"))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_attach_commandline_continue_app_exits(self):
 self.build()
 self.set_inferior_startup_attach()
@@ -128,8 +116,6 @@ def test_attach_commandline_continue_app_exits(self):
 lldbgdbserverutils.process_is_running(
 procs["inferior"].pid, False))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_one_valid_result(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -147,8 +133,6 @@ def test_qRegisterInfo_returns_one_valid_result(self):
 self.assert_valid_reg_info(
 lldbgdbserverutils.parse_reg_info_response(reg_info_packet))
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_returns_all_valid_results(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -162,8 +146,6 @@ def test_qRegisterInfo_returns_all_valid_results(self):
 for reg_info in self.parse_register_info_packets(context):
 self.assert_valid_reg_info(reg_info)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_required_generics_debugserver(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -193,8 +175,6 @@ def 
test_qRegisterInfo_contains_required_generics_debugserver(self):
 # Ensure we have a flags register.
 self.assertIn('flags', generic_regs)
 
-@skipIf(compiler="clang", compiler_version=['<', '14.0'])
-@skipIf(dwarf_version=['<', '3'])
 def test_qRegisterInfo_contains_at_least_one_register_set(self):
 self.build()
 self.prep_debug_monitor_and_inferior()
@@ -235,8 +215,6 @@ def targetHasAVX(self):
 @expectedFailureAll(oslist=["windows"])

[Lldb-commits] [PATCH] D118395: Disable TestLldbGdbServer on Dwarf2 and clang versions below 14

2022-02-05 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment.

Done in zorg and reverted this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118395

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