[Lldb-commits] [PATCH] D93939: [elf-core] Improve reading memory from core file

2021-01-27 Thread Djordje Todorovic via Phabricator via lldb-commits
djtodoro added a comment.

> Regarding the test, would it be possible to reuse one of the existing core 
> files? (The reason we have so few core tests is because we used to not allow 
> checked in core files at all -- now we kinda do, but it's still not ideal.) 
> I'm guessing you don't even need to disassemble a function to reproduce this 
> -- it should be sufficient to run `disassemble --start-address X 
> --end-address Y`, where the region `X--Y` crosses a core segment boundary..

We can disassemble a region that crosses core segment boundary, e.g.:
(let's use 
//lldb/test/API/functionalities/postmortem/elf-core/linux-x86_64.core//)

  (lldb) disassemble --start 0x400161 --end 0x40100c
0x400161: addb   %al, (%rax)
0x400163: addb   %al, (%rax)
0x400165: addb   %al, (%rax)
0x400167: addb   %dl, (%rax,%rax)
0x40016a: addb   %al, (%rax)
0x40016c: addb   %al, (%rax)
0x40016e: addb   %al, (%rax)
0x400170: addl   %edi, 0x52(%rdx)
0x400173: addb   %al, (%rcx)
0x400175: js 0x400187
0x400177: addl   %ebx, (%rbx)
0x400179: orb$0x7, %al
0x40017b: orb%dl, 0x1c01(%rax)
0x400181: addb   %al, (%rax)
0x400183: addb   %bl, (%rax,%rax)
0x400186: addb   %al, (%rax)
0x400188: testb  %bh, %bh

and this triggers the code for zero-bytes-filling. After applying this patch, 
the output of the command is exactly the same.
I am not sure what should we check in the test if we use this existing 
core-file, any idea?


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

https://reviews.llvm.org/D93939

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


[Lldb-commits] [PATCH] D95297: [lldb] [Process/FreeBSDRemote] Introduce arm64 support

2021-01-27 Thread Michał Górny via Phabricator via lldb-commits
mgorny updated this revision to Diff 319562.
mgorny added a comment.

Remove unused copy-pasted class method declarations.


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

https://reviews.llvm.org/D95297

Files:
  lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  lldb/source/Plugins/Process/FreeBSDRemote/CMakeLists.txt
  
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_arm64.cpp
  lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_arm64.h
  lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp

Index: lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
===
--- lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
+++ lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
@@ -17,6 +17,8 @@
 #include "Plugins/Process/Utility/lldb-x86-register-enums.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h"
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
+#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -231,3 +233,92 @@
 }
 
 #endif // defined(__i386__) || defined(__x86_64__)
+
+#if defined(__aarch64__)
+
+#define EXPECT_GPR_ARM64(lldb_reg, fbsd_reg)   \
+  EXPECT_THAT(GetRegParams(reg_ctx, gpr_##lldb_reg##_arm64),   \
+  ::testing::Pair(offsetof(reg, fbsd_reg), sizeof(reg::fbsd_reg)))
+#define EXPECT_FPU_ARM64(lldb_reg, fbsd_reg)   \
+  EXPECT_THAT(GetRegParams(reg_ctx, fpu_##lldb_reg##_arm64),   \
+  ::testing::Pair(offsetof(fpreg, fbsd_reg) + base_offset, \
+  sizeof(fpreg::fbsd_reg)))
+
+TEST(RegisterContextFreeBSDTest, arm64) {
+  ArchSpec arch{"aarch64-unknown-freebsd"};
+  RegisterInfoPOSIX_arm64 reg_ctx{arch};
+
+  EXPECT_GPR_ARM64(x0, x[0]);
+  EXPECT_GPR_ARM64(x1, x[1]);
+  EXPECT_GPR_ARM64(x2, x[2]);
+  EXPECT_GPR_ARM64(x3, x[3]);
+  EXPECT_GPR_ARM64(x4, x[4]);
+  EXPECT_GPR_ARM64(x5, x[5]);
+  EXPECT_GPR_ARM64(x6, x[6]);
+  EXPECT_GPR_ARM64(x7, x[7]);
+  EXPECT_GPR_ARM64(x8, x[8]);
+  EXPECT_GPR_ARM64(x9, x[9]);
+  EXPECT_GPR_ARM64(x10, x[10]);
+  EXPECT_GPR_ARM64(x11, x[11]);
+  EXPECT_GPR_ARM64(x12, x[12]);
+  EXPECT_GPR_ARM64(x13, x[13]);
+  EXPECT_GPR_ARM64(x14, x[14]);
+  EXPECT_GPR_ARM64(x15, x[15]);
+  EXPECT_GPR_ARM64(x16, x[16]);
+  EXPECT_GPR_ARM64(x17, x[17]);
+  EXPECT_GPR_ARM64(x18, x[18]);
+  EXPECT_GPR_ARM64(x19, x[19]);
+  EXPECT_GPR_ARM64(x20, x[20]);
+  EXPECT_GPR_ARM64(x21, x[21]);
+  EXPECT_GPR_ARM64(x22, x[22]);
+  EXPECT_GPR_ARM64(x23, x[23]);
+  EXPECT_GPR_ARM64(x24, x[24]);
+  EXPECT_GPR_ARM64(x25, x[25]);
+  EXPECT_GPR_ARM64(x26, x[26]);
+  EXPECT_GPR_ARM64(x27, x[27]);
+  EXPECT_GPR_ARM64(x28, x[28]);
+  EXPECT_GPR_ARM64(fp, x[29]);
+  EXPECT_GPR_ARM64(lr, lr);
+  EXPECT_GPR_ARM64(sp, sp);
+  EXPECT_GPR_ARM64(pc, elr);
+  EXPECT_GPR_ARM64(cpsr, spsr);
+
+  size_t base_offset = reg_ctx.GetRegisterInfo()[fpu_v0_arm64].byte_offset;
+
+  EXPECT_FPU_ARM64(v0, fp_q[0]);
+  EXPECT_FPU_ARM64(v1, fp_q[1]);
+  EXPECT_FPU_ARM64(v2, fp_q[2]);
+  EXPECT_FPU_ARM64(v3, fp_q[3]);
+  EXPECT_FPU_ARM64(v4, fp_q[4]);
+  EXPECT_FPU_ARM64(v5, fp_q[5]);
+  EXPECT_FPU_ARM64(v6, fp_q[6]);
+  EXPECT_FPU_ARM64(v7, fp_q[7]);
+  EXPECT_FPU_ARM64(v8, fp_q[8]);
+  EXPECT_FPU_ARM64(v9, fp_q[9]);
+  EXPECT_FPU_ARM64(v10, fp_q[10]);
+  EXPECT_FPU_ARM64(v11, fp_q[11]);
+  EXPECT_FPU_ARM64(v12, fp_q[12]);
+  EXPECT_FPU_ARM64(v13, fp_q[13]);
+  EXPECT_FPU_ARM64(v14, fp_q[14]);
+  EXPECT_FPU_ARM64(v15, fp_q[15]);
+  EXPECT_FPU_ARM64(v16, fp_q[16]);
+  EXPECT_FPU_ARM64(v17, fp_q[17]);
+  EXPECT_FPU_ARM64(v18, fp_q[18]);
+  EXPECT_FPU_ARM64(v19, fp_q[19]);
+  EXPECT_FPU_ARM64(v20, fp_q[20]);
+  EXPECT_FPU_ARM64(v21, fp_q[21]);
+  EXPECT_FPU_ARM64(v22, fp_q[22]);
+  EXPECT_FPU_ARM64(v23, fp_q[23]);
+  EXPECT_FPU_ARM64(v24, fp_q[24]);
+  EXPECT_FPU_ARM64(v25, fp_q[25]);
+  EXPECT_FPU_ARM64(v26, fp_q[26]);
+  EXPECT_FPU_ARM64(v27, fp_q[27]);
+  EXPECT_FPU_ARM64(v28, fp_q[28]);
+  EXPECT_FPU_ARM64(v29, fp_q[29]);
+  EXPECT_FPU_ARM64(v30, fp_q[30]);
+  EXPECT_FPU_ARM64(v31, fp_q[31]);
+  EXPECT_FPU_ARM64(fpsr, fp_sr);
+  EXPECT_FPU_ARM64(fpcr, fp_cr);
+}
+
+#endif // defined(__aarch64__)
Index: lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_arm64.h
===
--- /dev/null
+++ lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_arm64.h
@@ -0,0 +1,71 @@
+//===-- NativeRegisterContextFreeBSD_arm64.h *- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

[Lldb-commits] [PATCH] D93951: [vscode] Improve runInTerminal and support linux

2021-01-27 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added inline comments.



Comment at: lldb/tools/lldb-vscode/FifoFiles.cpp:9
+
+#if !defined(WIN32)
+#include 

Also, this is no good. It works if you are targeting windows on windows, but 
not if you are targeting something else and building on windows. There are a 
few different ways this is done in LLVM/clang and they are generally not based 
on defined(WIN32). Here are a couple of examples:

From llvm\lib\Support\Path.cpp:

```
#if !defined(_MSC_VER) && !defined(__MINGW32__)
```

From clang\lib\Driver\Driver.cpp:

```
#if LLVM_ON_UNIX
```

From llvm\lib\Support\ErrorHandling.cpp:

```
#if defined(HAVE_UNISTD_H)
```

I suggest browsing through the code and finding the most appropriate way to 
manage your includes. In the mean time, this is breaking our internal builds 
that run on Windows but do not target Windows.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93951

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


Re: [Lldb-commits] [PATCH] D93951: [vscode] Improve runInTerminal and support linux

2021-01-27 Thread Walter via lldb-commits
Good to know. I'll work on that right now. Thanks!

Il giorno mer 27 gen 2021 alle ore 11:41 Stella Stamenova via Phabricator <
revi...@reviews.llvm.org> ha scritto:

> stella.stamenova added inline comments.
>
>
> 
> Comment at: lldb/tools/lldb-vscode/FifoFiles.cpp:9
> +
> +#if !defined(WIN32)
> +#include 
> 
> Also, this is no good. It works if you are targeting windows on windows,
> but not if you are targeting something else and building on windows. There
> are a few different ways this is done in LLVM/clang and they are generally
> not based on defined(WIN32). Here are a couple of examples:
>
> From llvm\lib\Support\Path.cpp:
>
> ```
> #if !defined(_MSC_VER) && !defined(__MINGW32__)
> ```
>
> From clang\lib\Driver\Driver.cpp:
>
> ```
> #if LLVM_ON_UNIX
> ```
>
> From llvm\lib\Support\ErrorHandling.cpp:
>
> ```
> #if defined(HAVE_UNISTD_H)
> ```
>
> I suggest browsing through the code and finding the most appropriate way
> to manage your includes. In the mean time, this is breaking our internal
> builds that run on Windows but do not target Windows.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D93951/new/
>
> https://reviews.llvm.org/D93951
>
>

-- 
- Walter Erquínigo Pezo
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] ab5591e - Fix runInTerminal failures on Windows

2021-01-27 Thread Walter Erquinigo via lldb-commits

Author: Walter Erquinigo
Date: 2021-01-27T13:17:23-08:00
New Revision: ab5591e1d8f5abcfa9e75193d3e8a29087b61425

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

LOG: Fix runInTerminal failures on Windows

stella.stemenova mentioned in https://reviews.llvm.org/D93951 failures on 
Windows for this test.

I'm fixing the macro definitions and disabling the tests for python
versions lower than 3.7. I'll figure out that actual issue with
python3.6 after the buildbots are fine again.

Added: 


Modified: 
lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
lldb/tools/lldb-vscode/FifoFiles.cpp
lldb/tools/lldb-vscode/FifoFiles.h
lldb/tools/lldb-vscode/lldb-vscode.cpp

Removed: 




diff  --git 
a/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py 
b/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
index 055b5a5bed87..047cc317596f 100644
--- a/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
+++ b/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
@@ -33,20 +33,30 @@ def readErrorMessage(self, fifo_file):
 with open(fifo_file, "r") as file:
 return file.readline()
 
+def isTestSupported(self):
+# For some strange reason, this test fails on python3.6
+if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
+return False
+try:
+# We skip this test for debug builds because it takes too long 
parsing lldb's own
+# debug info. Release builds are fine.
+# Checking the size of the lldb-vscode binary seems to be a decent 
proxy for a quick
+# detection. It should be far less than 1 MB in Release builds.
+if os.path.getsize(os.environ["LLDBVSCODE_EXEC"]) < 100:
+return True
+except:
+return False
+
 @skipIfWindows
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_runInTerminal(self):
+if not self.isTestSupported():
+return
 '''
 Tests the "runInTerminal" reverse request. It makes sure that the 
IDE can
 launch the inferior with the correct environment variables and 
arguments.
 '''
-if "debug" in str(os.environ["LLDBVSCODE_EXEC"]).lower():
-# We skip this test for debug builds because it takes too long 
parsing lldb's own
-# debug info. Release builds are fine.
-# Checking this environment variable seems to be a decent proxy 
for a quick
-# detection
-return
 program = self.getBuildArtifact("a.out")
 source = 'main.c'
 self.build_and_launch(
@@ -77,6 +87,8 @@ def test_runInTerminal(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_runInTerminalInvalidTarget(self):
+if not self.isTestSupported():
+return
 self.build_and_create_debug_adaptor()
 response = self.launch(
 "INVALIDPROGRAM", stopOnEntry=True, runInTerminal=True, 
args=["foobar"], env=["FOO=bar"], expectFailure=True)
@@ -88,6 +100,8 @@ def test_runInTerminalInvalidTarget(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_missingArgInRunInTerminalLauncher(self):
+if not self.isTestSupported():
+return
 proc = subprocess.run([self.lldbVSCodeExec,  "--launch-target", 
"INVALIDPROGRAM"],
 capture_output=True, universal_newlines=True)
 self.assertTrue(proc.returncode != 0)
@@ -97,6 +111,8 @@ def test_missingArgInRunInTerminalLauncher(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherWithInvalidProgram(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -115,6 +131,8 @@ def 
test_FakeAttachedRunInTerminalLauncherWithInvalidProgram(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherWithValidProgram(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -132,6 +150,8 @@ def 
test_FakeAttachedRunInTerminalLauncherWithValidProgram(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherAndCheckEnvironment(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -150,6 +170,8 @@ def 
test_FakeAttached

[Lldb-commits] [PATCH] D93951: [vscode] Improve runInTerminal and support linux

2021-01-27 Thread walter erquinigo via Phabricator via lldb-commits
wallace added a comment.

@stella.stamenova , I've just pushed a fix. Let me know if it actually works.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93951

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


[Lldb-commits] [lldb] ab5591e - Fix runInTerminal failures on Windows

2021-01-27 Thread Walter Erquinigo via lldb-commits

Author: Walter Erquinigo
Date: 2021-01-27T13:17:23-08:00
New Revision: ab5591e1d8f5abcfa9e75193d3e8a29087b61425

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

LOG: Fix runInTerminal failures on Windows

stella.stemenova mentioned in https://reviews.llvm.org/D93951 failures on 
Windows for this test.

I'm fixing the macro definitions and disabling the tests for python
versions lower than 3.7. I'll figure out that actual issue with
python3.6 after the buildbots are fine again.

Added: 


Modified: 
lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
lldb/tools/lldb-vscode/FifoFiles.cpp
lldb/tools/lldb-vscode/FifoFiles.h
lldb/tools/lldb-vscode/lldb-vscode.cpp

Removed: 




diff  --git 
a/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py 
b/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
index 055b5a5bed87..047cc317596f 100644
--- a/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
+++ b/lldb/test/API/tools/lldb-vscode/runInTerminal/TestVSCode_runInTerminal.py
@@ -33,20 +33,30 @@ def readErrorMessage(self, fifo_file):
 with open(fifo_file, "r") as file:
 return file.readline()
 
+def isTestSupported(self):
+# For some strange reason, this test fails on python3.6
+if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
+return False
+try:
+# We skip this test for debug builds because it takes too long 
parsing lldb's own
+# debug info. Release builds are fine.
+# Checking the size of the lldb-vscode binary seems to be a decent 
proxy for a quick
+# detection. It should be far less than 1 MB in Release builds.
+if os.path.getsize(os.environ["LLDBVSCODE_EXEC"]) < 100:
+return True
+except:
+return False
+
 @skipIfWindows
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_runInTerminal(self):
+if not self.isTestSupported():
+return
 '''
 Tests the "runInTerminal" reverse request. It makes sure that the 
IDE can
 launch the inferior with the correct environment variables and 
arguments.
 '''
-if "debug" in str(os.environ["LLDBVSCODE_EXEC"]).lower():
-# We skip this test for debug builds because it takes too long 
parsing lldb's own
-# debug info. Release builds are fine.
-# Checking this environment variable seems to be a decent proxy 
for a quick
-# detection
-return
 program = self.getBuildArtifact("a.out")
 source = 'main.c'
 self.build_and_launch(
@@ -77,6 +87,8 @@ def test_runInTerminal(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_runInTerminalInvalidTarget(self):
+if not self.isTestSupported():
+return
 self.build_and_create_debug_adaptor()
 response = self.launch(
 "INVALIDPROGRAM", stopOnEntry=True, runInTerminal=True, 
args=["foobar"], env=["FOO=bar"], expectFailure=True)
@@ -88,6 +100,8 @@ def test_runInTerminalInvalidTarget(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_missingArgInRunInTerminalLauncher(self):
+if not self.isTestSupported():
+return
 proc = subprocess.run([self.lldbVSCodeExec,  "--launch-target", 
"INVALIDPROGRAM"],
 capture_output=True, universal_newlines=True)
 self.assertTrue(proc.returncode != 0)
@@ -97,6 +111,8 @@ def test_missingArgInRunInTerminalLauncher(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherWithInvalidProgram(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -115,6 +131,8 @@ def 
test_FakeAttachedRunInTerminalLauncherWithInvalidProgram(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherWithValidProgram(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -132,6 +150,8 @@ def 
test_FakeAttachedRunInTerminalLauncherWithValidProgram(self):
 @skipIfRemote
 @skipIf(archs=no_match(['x86_64']))
 def test_FakeAttachedRunInTerminalLauncherAndCheckEnvironment(self):
+if not self.isTestSupported():
+return
 comm_file = os.path.join(self.getBuildDir(), "comm-file")
 os.mkfifo(comm_file)
 
@@ -150,6 +170,8 @@ def 
test_FakeAttached

[Lldb-commits] [PATCH] D90789: [docs] Update DebuggingJITedCode page after fix in LLDB

2021-01-27 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz added a comment.

Thanks! Eventually, I closed https://llvm.org/PR36209


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90789

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


[Lldb-commits] [PATCH] D90789: [docs] Update DebuggingJITedCode page after fix in LLDB

2021-01-27 Thread Stefan Gränitz 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 rG332e220ef42b: [docs] Update DebuggingJITedCode page after 
fix in LLDB (authored by sgraenitz).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90789

Files:
  llvm/docs/DebuggingJITedCode.rst

Index: llvm/docs/DebuggingJITedCode.rst
===
--- llvm/docs/DebuggingJITedCode.rst
+++ llvm/docs/DebuggingJITedCode.rst
@@ -1,35 +1,48 @@
-==
-Debugging JIT-ed Code With GDB
-==
+=
+Debugging JIT-ed Code
+=
 
 Background
 ==
 
-Without special runtime support, debugging dynamically generated code with
-GDB (as well as most debuggers) can be quite painful.  Debuggers generally
-read debug information from the object file of the code, but for JITed
-code, there is no such file to look for.
-
-In order to communicate the necessary debug info to GDB, an interface for
-registering JITed code with debuggers has been designed and implemented for
-GDB and LLVM MCJIT.  At a high level, whenever MCJIT generates new machine code,
-it does so in an in-memory object file that contains the debug information in
-DWARF format.  MCJIT then adds this in-memory object file to a global list of
-dynamically generated object files and calls a special function
-(``__jit_debug_register_code``) marked noinline that GDB knows about.  When
-GDB attaches to a process, it puts a breakpoint in this function and loads all
-of the object files in the global list.  When MCJIT calls the registration
-function, GDB catches the breakpoint signal, loads the new object file from
-the inferior's memory, and resumes the execution.  In this way, GDB can get the
-necessary debug information.
+Without special runtime support, debugging dynamically generated code can be
+quite painful.  Debuggers generally read debug information from object files on
+disk, but for JITed code there is no such file to look for.
+
+In order to hand over the necessary debug info, `GDB established an
+interface `_
+for registering JITed code with debuggers. LLDB implements it in the
+JITLoaderGDB plugin.  On the JIT side, LLVM MCJIT does implement the interface
+for ELF object files.
+
+At a high level, whenever MCJIT generates new machine code, it does so in an
+in-memory object file that contains the debug information in DWARF format.
+MCJIT then adds this in-memory object file to a global list of dynamically
+generated object files and calls a special function
+``__jit_debug_register_code`` that the debugger knows about. When the debugger
+attaches to a process, it puts a breakpoint in this function and associates a
+special handler with it.  Once MCJIT calls the registration function, the
+debugger catches the breakpoint signal, loads the new object file from the
+inferior's memory and resumes execution.  This way it can obtain debug
+information for pure in-memory object files.
+
 
 GDB Version
 ===
 
 In order to debug code JIT-ed by LLVM, you need GDB 7.0 or newer, which is
 available on most modern distributions of Linux.  The version of GDB that
-Apple ships with Xcode has been frozen at 6.3 for a while.  LLDB may be a
-better option for debugging JIT-ed code on macOS.
+Apple ships with Xcode has been frozen at 6.3 for a while.
+
+
+LLDB Version
+
+
+Due to a regression in release 6.0, LLDB didn't support JITed code debugging for
+a while.  The bug was fixed in mainline recently, so that debugging JITed ELF
+objects should be possible again from the upcoming release 12.0 on. On macOS the
+feature must be enabled explicitly using the ``plugin.jit-loader.gdb.enable``
+setting.
 
 
 Debugging MCJIT-ed code
@@ -39,8 +52,8 @@
 GDB.  This is due to MCJIT's ability to use the MC emitter to provide full
 DWARF debugging information to GDB.
 
-Note that lli has to be passed the ``-jit-kind=mcjit`` flag to JIT the code with
-MCJIT instead of the old JIT.
+Note that lli has to be passed the ``--jit-kind=mcjit`` flag to JIT the code
+with MCJIT instead of the newer ORC JIT.
 
 Example
 ---
@@ -81,63 +94,89 @@
22  }
 
 Here is a sample command line session that shows how to build and run this
-code via ``lli`` inside GDB:
+code via ``lli`` inside LLDB:
 
 .. code-block:: bash
 
-   $ $BINPATH/clang -cc1 -O0 -g -emit-llvm showdebug.c
-   $ gdb --quiet --args $BINPATH/lli -jit-kind=mcjit showdebug.ll 5
-   Reading symbols from $BINPATH/lli...done.
-   (gdb) b showdebug.c:6
-   No source file named showdebug.c.
-   Make breakpoint pending on future shared library load? (y or [n]) y
-   Breakpoint 1 (showdebug.c:6) pending.
-   (gdb) r
-   Starting program: $BINPATH/lli -jit-kind=mcjit showdebug.ll 5

[Lldb-commits] [PATCH] D94374: [CMake] Remove dead code setting policies to NEW

2021-01-27 Thread Raul Tambre via Phabricator via lldb-commits
tambre marked an inline comment as done.
tambre added a comment.

ldionne: ping


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94374

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


[Lldb-commits] [PATCH] D94374: [CMake] Remove dead code setting policies to NEW

2021-01-27 Thread Louis Dionne via Phabricator via lldb-commits
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94374

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


[Lldb-commits] [PATCH] D94374: [CMake] Remove dead code setting policies to NEW

2021-01-27 Thread Raul Tambre via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG480643a95cd1: [CMake] Remove dead code setting policies to 
NEW (authored by tambre).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94374

Files:
  clang/CMakeLists.txt
  compiler-rt/CMakeLists.txt
  flang/CMakeLists.txt
  libcxx/CMakeLists.txt
  libcxx/utils/ci/runtimes/CMakeLists.txt
  libcxxabi/CMakeLists.txt
  libunwind/CMakeLists.txt
  lldb/CMakeLists.txt
  llvm/CMakeLists.txt
  mlir/examples/standalone/CMakeLists.txt

Index: mlir/examples/standalone/CMakeLists.txt
===
--- mlir/examples/standalone/CMakeLists.txt
+++ mlir/examples/standalone/CMakeLists.txt
@@ -1,20 +1,8 @@
 cmake_minimum_required(VERSION 3.13.4)
-
-if(POLICY CMP0068)
-  cmake_policy(SET CMP0068 NEW)
-  set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-endif()
-
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW)
-endif()
-
-if(POLICY CMP0077)
-  cmake_policy(SET CMP0077 NEW)
-endif()
-
 project(standalone-dialect LANGUAGES CXX C)
 
+set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
+
 set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
 
 find_package(MLIR REQUIRED CONFIG)
Index: llvm/CMakeLists.txt
===
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -2,18 +2,7 @@
 
 cmake_minimum_required(VERSION 3.13.4)
 
-if(POLICY CMP0068)
-  cmake_policy(SET CMP0068 NEW)
-  set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-endif()
-
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW)
-endif()
-
-if(POLICY CMP0077)
-  cmake_policy(SET CMP0077 NEW)
-endif()
+set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
 
 if(NOT DEFINED LLVM_VERSION_MAJOR)
   set(LLVM_VERSION_MAJOR 12)
Index: lldb/CMakeLists.txt
===
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -1,13 +1,5 @@
 cmake_minimum_required(VERSION 3.13.4)
 
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW)
-endif()
-
-if(POLICY CMP0077)
-  cmake_policy(SET CMP0077 NEW)
-endif()
-
 # Add path for custom modules.
 set(CMAKE_MODULE_PATH
   ${CMAKE_MODULE_PATH}
Index: libunwind/CMakeLists.txt
===
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -8,10 +8,6 @@
 
 cmake_minimum_required(VERSION 3.13.4)
 
-if (POLICY CMP0042)
-  cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default
-endif()
-
 # Add path for custom modules
 set(CMAKE_MODULE_PATH
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
Index: libcxxabi/CMakeLists.txt
===
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -10,10 +10,6 @@
 
 cmake_minimum_required(VERSION 3.13.4)
 
-if(POLICY CMP0042)
-  cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default
-endif()
-
 # Add path for custom modules
 set(CMAKE_MODULE_PATH
   "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
Index: libcxx/utils/ci/runtimes/CMakeLists.txt
===
--- libcxx/utils/ci/runtimes/CMakeLists.txt
+++ libcxx/utils/ci/runtimes/CMakeLists.txt
@@ -1,20 +1,8 @@
 cmake_minimum_required(VERSION 3.13.4)
-
-if(POLICY CMP0068)
-  cmake_policy(SET CMP0068 NEW)
-  set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-endif()
-
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW)
-endif()
-
-if(POLICY CMP0077)
-  cmake_policy(SET CMP0077 NEW)
-endif()
-
 project(LLVM_RUNTIMES)
 
+set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
+
 find_package(Python3 COMPONENTS Interpreter)
 if(NOT Python3_Interpreter_FOUND)
   message(WARNING "Python3 not found, using python2 as a fallback")
Index: libcxx/CMakeLists.txt
===
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -10,16 +10,7 @@
 #===
 cmake_minimum_required(VERSION 3.13.4)
 
-if(POLICY CMP0042)
-  cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default
-endif()
-if(POLICY CMP0022)
-  cmake_policy(SET CMP0022 NEW) # Required when interacting with LLVM and Clang
-endif()
-if(POLICY CMP0068)
-  cmake_policy(SET CMP0068 NEW)
-  set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-endif()
+set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
 
 # Add path for custom modules
 set(CMAKE_MODULE_PATH
Index: flang/CMakeLists.txt
===
--- flang/CMakeLists.txt
+++ flang/CMakeLists.txt
@@ -1,20 +1,6 @@
 cmake_minimum_required(VERSION 3.13.4)
 
-# RPATH settings on macOS do not affect INSTALL_NAME.
-if (POLICY CMP0068)
-  cmake_policy(SET CMP0068 NEW)
-  set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-endif()
-
-# Include file check macros honor CMAKE_REQUIRED_LIBRARIES.
-if(POLICY CMP0075)
-  cmake_policy(SET CMP0075 NEW)
-en

[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie created this revision.
haampie added a reviewer: JDevlieghere.
Herald added a reviewer: bollu.
haampie requested review of this revision.
Herald added projects: clang, Sanitizers, LLDB, OpenMP, LLVM.
Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, 
Sanitizers, cfe-commits.

Allow users to use a non-system version of perl, python and awk, which is 
useful in certain package managers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  compiler-rt/utils/generate_netbsd_ioctls.awk
  compiler-rt/utils/generate_netbsd_syscalls.awk
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # Wrapper around LLVM tools to generate a native .o from llvm-gxx using an
 # LLVM back-end (CBE by default).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 ##===- utils/llvmbuild - Build the LLVM project *-python-*-===##
 #
 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  findsym.pl
 #
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -595,7 +595,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -703,7 +703,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests debugg

[Lldb-commits] [PATCH] D67954: [LLDB] [Windows] Initial support for ARM64 register contexts

2021-01-27 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.
Herald added a subscriber: omjavaid.

Is there a specific reason you've only covered x0..x7 in the test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67954

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


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@JDevlieghere, would you care to review? This is another instance of moving 
away from system binaries to whatever the user / package manager wants the 
build to use.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95119

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


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added a comment.

`#!/usr/bin/env perl -w` (2 arguments) unfortunately does not work on Linux and 
many other systems.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95119

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


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

In D95119#2525925 , @MaskRay wrote:

> `#!/usr/bin/env perl -w` (2 arguments) unfortunately does not work on Linux 
> and many other systems.

Not sure if there's a similar thing for `awk`, but I think `use warnings` is 
preferred nowadays over `perl -w`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95119

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


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere requested changes to this revision.
JDevlieghere added a comment.
This revision now requires changes to proceed.

Oops, didn't mean to accept.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95119

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


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added a comment.

Several `llvm/utils/` scripts can probably just be removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95119

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


[Lldb-commits] [PATCH] D91679: [trace][intel-pt] Implement trace start and trace stop

2021-01-27 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

See my inlined comments, but it would be great to be able to just trace a few 
threads if any "tids" are specified in the "jLLDBTraceStart" packet, and all 
threads using a per thread buffer and call that "process". We would still use a 
per thread buffer for "process" tracing, basically "currentAndFutureThreads" 
will become the equivalent of "process" tracing. Just have the Intel PT trace 
plug-in take care of it. We can avoid any use of the one buffer for the entire 
process issues you mentioned that way, and it effectively does what the user 
wants. Adding a max memory settings to the custom settings in "jLLDBTraceStart" 
for Intel PT sounds like a good idea as well.




Comment at: lldb/docs/lldb-gdb-remote.txt:278
+// "tids": [],
+// "variant": "specificThreads" | "currentAndFutureThreads" | "process",
+// "params": {

I would be happy to just call "currentAndFutureThreads" to be the same thing as 
"process" here. No one cares how it is done, and this ends up tracing all 
threads anyway right? Can't we just make it happen? A user doesn't care if it 
uses the same trace buffer for all threads, just as long as all threads can be 
traced.



Comment at: lldb/docs/lldb-gdb-remote.txt:310
+//  {
+//"bufferSizeInKB": 
+//"perfConfig": 

maybe better named as "threadBufferSize"? Does it have to be in KB? Does it 
actually have to be a multiple of kernel page sizes at all? The description 
isn't clear that this is a per thread buffer, so a better description would be 
great that explains this.



Comment at: lldb/docs/lldb-gdb-remote.txt:311
+//"bufferSizeInKB": 
+//"perfConfig": 
+//  }

more description on this please?



Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:1690
+thread_id,
+m_intel_pt_trace_new_threads_params->params.buffer_size_in_kb,
+m_intel_pt_trace_new_threads_params->params.perf_config)) {

max memory setting would be nice and should maybe be specified at trace start?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91679

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