[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread Kevin Frei via lldb-commits

https://github.com/kevinfrei created 
https://github.com/llvm/llvm-project/pull/86292

@GeorgeHuyubo noticed an unchecked shared pointer result in 
https://github.com/llvm/llvm-project/pull/85693/. This is the fix for that 
issue.

>From 6bc82c0820963050752e6faabef7ec10e8c81f2f Mon Sep 17 00:00:00 2001
From: Kevin Frei 
Date: Fri, 22 Mar 2024 08:04:37 -0700
Subject: [PATCH] Missed a null-ptr check in previous PR

---
 lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp 
b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index 91b8b4a979e0c7..a9956aa9075fe2 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
   ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
   module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
   dwp_file_data_sp, dwp_file_data_offset);
-  if (!ObjectFileELF::classof(dwp_obj_file.get()))
+  if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
 return false;
   // The presence of a debug_cu_index section is the key identifying feature of
   // a DWP file. Make sure we don't fill in the section list on dwp_obj_file

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


[Lldb-commits] [lldb] DebugInfoD tests + fixing issues exposed by tests (PR #85693)

2024-03-22 Thread Kevin Frei via lldb-commits


@@ -44,6 +44,25 @@ llvm::StringRef 
SymbolVendorELF::GetPluginDescriptionStatic() {
  "executables.";
 }
 
+// If this is needed elsewhere, it can be exported/moved.
+static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
+const FileSpec &file_spec) {
+  DataBufferSP dwp_file_data_sp;
+  lldb::offset_t dwp_file_data_offset = 0;
+  // Try to create an ObjectFile from the file_spec.
+  ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
+  module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
+  dwp_file_data_sp, dwp_file_data_offset);
+  if (!ObjectFileELF::classof(dwp_obj_file.get()))

kevinfrei wrote:

Fixed in PR https://github.com/llvm/llvm-project/pull/86292 Good catch, 
@GeorgeHuyubo !

https://github.com/llvm/llvm-project/pull/85693
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread Kevin Frei via lldb-commits

https://github.com/kevinfrei ready_for_review 
https://github.com/llvm/llvm-project/pull/86292
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Kevin Frei (kevinfrei)


Changes

@GeorgeHuyubo noticed an unchecked shared pointer result in 
https://github.com/llvm/llvm-project/pull/85693/. This is the fix for that 
issue.

---
Full diff: https://github.com/llvm/llvm-project/pull/86292.diff


1 Files Affected:

- (modified) lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp (+1-1) 


``diff
diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp 
b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index 91b8b4a979e0c7..a9956aa9075fe2 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
   ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
   module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
   dwp_file_data_sp, dwp_file_data_offset);
-  if (!ObjectFileELF::classof(dwp_obj_file.get()))
+  if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
 return false;
   // The presence of a debug_cu_index section is the key identifying feature of
   // a DWP file. Make sure we don't fill in the section list on dwp_obj_file

``




https://github.com/llvm/llvm-project/pull/86292
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread via lldb-commits

https://github.com/GeorgeHuyubo approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/86292
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] DebugInfoD tests + fixing issues exposed by tests (PR #85693)

2024-03-22 Thread Andres Villegas via lldb-commits

avillega wrote:

I am seeing some errors related to this PR in our builds. Just want to confirm 
if the fix forward you have up for review will fix it. Otherwise, could you 
revert this change? Thanks!
```
ERROR: test_debuginfod_executable 
(TestDebuginfod.DebugInfodTests.test_debuginfod_executable)
   Test behavior with the full binary available from Debuginfod as
--
Traceback (most recent call last):
  File 
"/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/debuginfod/Normal/TestDebuginfod.py",
 line 74, in test_debuginfod_executable
test_root = self.config_test(["a.out"], None, "a.out.full")
^^^
  File 
"/b/s/w/ir/x/w/llvm-llvm-project/lldb/test/API/debuginfod/Normal/TestDebuginfod.py",
 line 158, in config_test
uuid_dir = os.path.join(self.tmp_dir, "buildid", uuid)
   ^^^
  File "", line 90, in join
  File "", line 152, in _check_arg_types
TypeError: join() argument must be str, bytes, or os.PathLike object, not 
'NoneType'
Config=x86_64-/b/s/w/ir/x/w/llvm_build/bin/clang
==
```


https://github.com/llvm/llvm-project/pull/85693
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread via lldb-commits

llvmbot wrote:



@llvm/pr-subscribers-clangd

@llvm/pr-subscribers-lldb

Author: None (ldrumm)


Changes

Historically, we've not automatically enforced how git tracks line endings, but 
there are many, many commits that "undo" unintended CRLFs getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits involving 
reverts of CRLF making its way into the index and then history. As far as I can 
tell, there are none the other way round except for specific cases like `.bat` 
files or tests for parsers that need to accept such sequences.

Of note, one of the earliest of those listed in that output is:

  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi 
  Date:   Thu Feb 3 11:41:27 2011 +

  cmake/*: Add svn:eol-style=native and fix CRLF.

  llvm-svn: 124793

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crapshoot whether enforcing 
storing line endings in the history will upset checkouts on machines where such 
line endings are the norm. Indeed many users have enforced that git checks out 
the working copy according to a global or per-user config via core crlf, or 
core autocrlf.

However, for ~8 years now[1], however, git has supported the ability to "do as 
the Romans do" on checkout, but internally store subsets of text files with 
line-endings specified via a system of patterns in the gitattributes file. 
Since we now have this ability, and we've been specifying attributes for 
various binary files, I think it makes sense to rid us of all that work 
converting things "back", and just let git handle the local checkout. Thus the 
new toplevel policy here is

  * text=auto

In simple terms this means "unless otherwise specified, convert all files 
considered "text" files to LF in the project history, but checkout them out as 
expected on the local machine. What is "expected on the local machine" is 
dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've adopted a 
policy of `eol=crlf` which means that git will store them in history with LF, 
but regardless of user config, they'll be checked out in tree with CRLF.

There also appears to be a single test,
clang/test/Frontend/rewrite-includes-mixed-eol-crlf.[ch] which needs mixed line 
endings. This one uses eol=input to preserve it as-is.

Finally, existing files have been "corrected" in history via `git add 
--renormalize .`

[1]: git 2.10 was released with fixed support for fine-grained line-ending 
tracking that respects user-config *and* repo policy. This can be considered 
the point at which git will respect both the user's local working tree 
preference *and* the history as specified by the maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248 
for the release note.

---

Patch is 1.90 MiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/86318.diff


254 Files Affected:

- (modified) .gitattributes (+6) 
- (added) clang-tools-extra/clangd/test/.gitattributes (+3) 
- (modified) 
clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test (+11-11) 
- (modified) clang-tools-extra/clangd/test/hover.test (+57-57) 
- (modified) clang-tools-extra/clangd/test/input-mirror.test (+17-17) 
- (modified) clang-tools-extra/clangd/test/protocol.test (+113-113) 
- (modified) clang-tools-extra/clangd/test/spaces-in-delimited-input.test 
(+13-13) 
- (modified) clang-tools-extra/clangd/test/too_large.test (+7-7) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
 (+15-15) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
 (+1-1) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
 (+1-1) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
 (+22-22) 
- (modified) 
clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap (+10-10) 
- (modified) 
clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap 
(+10-10) 
- (modified) clang-tools-extra/test/pp-trace/Inputs/module.modulemap (+18-18) 
- (modified) clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp (+155-155) 
- (added) clang/test/.gitattributes (+3) 
- (modified) clang/test/AST/HLSL/this-reference-template.hlsl (+46-46) 
- (modified) clang/test/AST/HLSL/this-reference.hlsl (+62-62) 
- (modified) clang/test/AST/objc-default-ctor-init.mm (+21-21) 
- (modified) clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp 
(+56-56) 
- (modified) 
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp 
(+22-22) 
- (modified) clang/test/CXX/lex/lex.literal/lex.string/p4.cpp (+17-17) 
- (modified) clang/test/CodeGen/fpconstrained.c (+25-25) 
- (modified) cla

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-backend-x86

Author: None (ldrumm)


Changes

Historically, we've not automatically enforced how git tracks line endings, but 
there are many, many commits that "undo" unintended CRLFs getting into history.

`git log --pretty=oneline --grep=CRLF` shows nearly 100 commits involving 
reverts of CRLF making its way into the index and then history. As far as I can 
tell, there are none the other way round except for specific cases like `.bat` 
files or tests for parsers that need to accept such sequences.

Of note, one of the earliest of those listed in that output is:

  commit 9795860250734e5c2a879546c534e35d9edd5944
  Author: NAKAMURA Takumi 
  Date:   Thu Feb 3 11:41:27 2011 +

  cmake/*: Add svn:eol-style=native and fix CRLF.

  llvm-svn: 124793

...which introduced such a defacto policy for subversion.

With old versions of git, it's been a bit of a crapshoot whether enforcing 
storing line endings in the history will upset checkouts on machines where such 
line endings are the norm. Indeed many users have enforced that git checks out 
the working copy according to a global or per-user config via core crlf, or 
core autocrlf.

However, for ~8 years now[1], however, git has supported the ability to "do as 
the Romans do" on checkout, but internally store subsets of text files with 
line-endings specified via a system of patterns in the gitattributes file. 
Since we now have this ability, and we've been specifying attributes for 
various binary files, I think it makes sense to rid us of all that work 
converting things "back", and just let git handle the local checkout. Thus the 
new toplevel policy here is

  * text=auto

In simple terms this means "unless otherwise specified, convert all files 
considered "text" files to LF in the project history, but checkout them out as 
expected on the local machine. What is "expected on the local machine" is 
dependent on configuration and default.

For those files in the repository that *do* need CRLF endings, I've adopted a 
policy of `eol=crlf` which means that git will store them in history with LF, 
but regardless of user config, they'll be checked out in tree with CRLF.

There also appears to be a single test,
clang/test/Frontend/rewrite-includes-mixed-eol-crlf.[ch] which needs mixed line 
endings. This one uses eol=input to preserve it as-is.

Finally, existing files have been "corrected" in history via `git add 
--renormalize .`

[1]: git 2.10 was released with fixed support for fine-grained line-ending 
tracking that respects user-config *and* repo policy. This can be considered 
the point at which git will respect both the user's local working tree 
preference *and* the history as specified by the maintainers. See
https://github.com/git/git/blob/master/Documentation/RelNotes/2.10.0.txt#L248 
for the release note.

---

Patch is 1.90 MiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/86318.diff


254 Files Affected:

- (modified) .gitattributes (+6) 
- (added) clang-tools-extra/clangd/test/.gitattributes (+3) 
- (modified) 
clang-tools-extra/clangd/test/delimited-input-comment-at-the-end.test (+11-11) 
- (modified) clang-tools-extra/clangd/test/hover.test (+57-57) 
- (modified) clang-tools-extra/clangd/test/input-mirror.test (+17-17) 
- (modified) clang-tools-extra/clangd/test/protocol.test (+113-113) 
- (modified) clang-tools-extra/clangd/test/spaces-in-delimited-input.test 
(+13-13) 
- (modified) clang-tools-extra/clangd/test/too_large.test (+7-7) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
 (+15-15) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
 (+1-1) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
 (+1-1) 
- (modified) 
clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
 (+22-22) 
- (modified) 
clang-tools-extra/test/modularize/Inputs/CompileError/module.modulemap (+10-10) 
- (modified) 
clang-tools-extra/test/modularize/Inputs/MissingHeader/module.modulemap 
(+10-10) 
- (modified) clang-tools-extra/test/pp-trace/Inputs/module.modulemap (+18-18) 
- (modified) clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp (+155-155) 
- (added) clang/test/.gitattributes (+3) 
- (modified) clang/test/AST/HLSL/this-reference-template.hlsl (+46-46) 
- (modified) clang/test/AST/HLSL/this-reference.hlsl (+62-62) 
- (modified) clang/test/AST/objc-default-ctor-init.mm (+21-21) 
- (modified) clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp 
(+56-56) 
- (modified) 
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp 
(+22-22) 
- (modified) clang/test/CXX/lex/lex.literal/lex.string/p4.cpp (+17-17) 
- (modified) clang/test/CodeGen/fpconstrained.c (+25-25) 
- (modified) clang/test/CodeGen/fpcon

[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread via lldb-commits

ldrumm wrote:

I'm sure there are lots of people that will want to look at this, so please 
bring in reviewers at will

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread via lldb-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff cd8286a667d568c4319b09baa63ba899e3101a19 
2dfda2e4b11c7ea0a81dd4dcd43aa426039d1e0a -- 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include.h
 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/duplicate-include2.h
 
clang-tools-extra/test/clang-tidy/checkers/readability/Inputs/duplicate-include/system/sys/types.h
 
clang-tools-extra/test/clang-tidy/checkers/readability/else-after-return-if-constexpr.cpp
 clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp 
clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-examples.cpp 
clang/test/CXX/expr/expr.prim/expr.prim.lambda/p15-star-this-capture.cpp 
clang/test/CXX/lex/lex.literal/lex.string/p4.cpp 
clang/test/CodeGen/fpconstrained.c clang/test/CodeGen/fpconstrained.cpp 
clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp 
clang/test/CodeGenCXX/debug-info-atexit-stub.cpp 
clang/test/Driver/ps4-ps5-relax-relocations.c 
clang/test/FixIt/fixit-newline-style.c 
clang/test/Frontend/rewrite-includes-macros.cpp 
clang/test/Frontend/rewrite-includes-mixed-eol-crlf.c 
clang/test/Frontend/rewrite-includes-mixed-eol-crlf.h 
clang/test/Frontend/system-header-line-directive-ms-lineendings.c 
clang/test/Lexer/minimize_source_to_dependency_directives_include.c 
clang/test/Lexer/minimize_source_to_dependency_directives_utf8bom.c 
clang/test/Preprocessor/macro_vaopt_check.cpp 
clang/test/Preprocessor/macro_vaopt_expand.cpp 
clang/test/Sema/aarch64-sve-vector-log-ops.c 
clang/test/Sema/aarch64-sve-vector-trig-ops.c 
clang/test/Sema/incorrect_pure.cpp clang/test/Sema/riscv-rvv-vector-log-ops.c 
clang/test/Sema/riscv-rvv-vector-trig-ops.c 
clang/test/SemaCXX/attr-non-x86-no_caller_saved_registers.cpp 
clang/test/SemaCXX/attr-x86-no_caller_saved_registers.cpp 
clang/test/SemaCXX/compound-literal.cpp 
clang/test/SemaCXX/cxx23-static-callop-lambda-expression.cpp 
clang/test/SemaCXX/vla-ext-diag.cpp clang/test/SemaCXX/warn-redundant-move.cpp 
clang/test/SemaCXX/warn-shadow.cpp 
clang/test/SemaTemplate/default-expr-arguments-3.cpp 
compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp 
lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp 
lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp 
lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp 
lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp 
llvm/test/tools/llvm-pdbutil/Inputs/TypeServerTest.cpp
``





View the diff from clang-format here.


``diff
diff --git a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp 
b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
index 5b54c68161..63b4da3502 100644
--- a/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/strndup_oob_test2.cpp
@@ -11,7 +11,7 @@
 
 #include 
 
-char kChars[] = { 'f', 'o', 'o' };
+char kChars[] = {'f', 'o', 'o'};
 
 int main(int argc, char **argv) {
   char *copy = strndup(kChars, 3);
diff --git a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp 
b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
index d5b96472eb..1519b625fa 100644
--- a/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
+++ b/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
@@ -5,36 +5,28 @@
 #include 
 #else
 int main();
-extern "C"
-{
-int _fltused;
-void mainCRTStartup() { main(); }
-void printf(const char*, ...) {}
+extern "C" {
+int _fltused;
+void mainCRTStartup() { main(); }
+void printf(const char *, ...) {}
 }
 #endif
 
-void crash(bool crash_self)
-{
-printf("Before...\n");
-if(crash_self)
-{
-printf("Crashing in 3, 2, 1 ...\n");
-*(volatile int*)nullptr = 0;
-}
-printf("After...\n");
+void crash(bool crash_self) {
+  printf("Before...\n");
+  if (crash_self) {
+printf("Crashing in 3, 2, 1 ...\n");
+*(volatile int *)nullptr = 0;
+  }
+  printf("After...\n");
 }
 
-int foo(int x, float y, const char* msg)
-{
-bool flag = x > y;
-if(flag)
-printf("x = %d, y = %f, msg = %s\n", x, y, msg);
-crash(flag);
-return x << 1;
-}
-
-int main()
-{
-foo(10, 3.14, "testing");
+int foo(int x, float y, const char *msg) {
+  bool flag = x > y;
+  if (flag)
+printf("x = %d, y = %f, msg = %s\n", x, y, msg);
+  crash(flag);
+  return x << 1;
 }
 
+int main() { foo(10, 3.14, "testing"); }

``




https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Adrian Prantl via lldb-commits

adrian-prantl wrote:

While I'm sure this commit will manage to break _something_ unexpectedly, I 
think this is reasonable to do! Thanks for taking this on.

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] b1575f9 - Missed a null-ptr check in previous PR for Debuginfod testing (#86292)

2024-03-22 Thread via lldb-commits

Author: Kevin Frei
Date: 2024-03-22T11:22:09-07:00
New Revision: b1575f9082071702bd6aaa2600ce9fe011a091e9

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

LOG: Missed a null-ptr check in previous PR for Debuginfod testing (#86292)

@GeorgeHuyubo noticed an unchecked shared pointer result in
https://github.com/llvm/llvm-project/pull/85693/. This is the fix for
that issue.

Co-authored-by: Kevin Frei 

Added: 


Modified: 
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp 
b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index 91b8b4a979e0c7..a9956aa9075fe2 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
   ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
   module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
   dwp_file_data_sp, dwp_file_data_offset);
-  if (!ObjectFileELF::classof(dwp_obj_file.get()))
+  if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
 return false;
   // The presence of a debug_cu_index section is the key identifying feature of
   // a DWP file. Make sure we don't fill in the section list on dwp_obj_file



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


[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread Greg Clayton via lldb-commits

https://github.com/clayborg closed 
https://github.com/llvm/llvm-project/pull/86292
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Missed a null-ptr check in previous PR for Debuginfod testing (PR #86292)

2024-03-22 Thread Greg Clayton via lldb-commits

https://github.com/clayborg approved this pull request.


https://github.com/llvm/llvm-project/pull/86292
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Reid Kleckner via lldb-commits

rnk wrote:

I think it makes sense to remove carriage returns on checkin, but I'm not sure 
it makes sense to add them back on checkout on Windows. Historically, it's been 
really easy to write LLVM tests that fail when the source is checked out with 
CRLF. Many Windows developers have noted that LLVM tests fail when using the 
git config options to accomplish this. So, is there a way to do CRLF -> LF on 
checkin, but do nothing on checkout?

I think all modern editors on Windows can read LF files, it's just that they 
tend to prefer to write files out in CRLF, and that's the main source of 
friction.

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Paul T Robinson via lldb-commits

pogo59 wrote:

As a data point, I've been setting `core.autocrlf=true` on Windows for years. 
I've been trained to make sure _new_ files have LF endings (usually I copy an 
existing file instead of creating a new file) but both Notepad and the Visual 
Studio editor are willing to preserve the line-ending mode of the file as they 
found it. (This was not always true, but is these days.)

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread via lldb-commits

ldrumm wrote:

> So, is there a way to do CRLF -> LF on checkin, but do nothing on checkout?

To be clear, this *may* do nothing on checkout if a user has set a config 
option. The point of the present policy is not to control local preferences as 
far as the filetype isn't *reqired* to have a specific format; we only control 
what ends up in history.

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Reid Kleckner via lldb-commits

rnk wrote:

> As a data point, I've been setting core.autocrlf=true on Windows for years. 

If that's the case, my information is stale, which I accept.

> To be clear, this may do nothing on checkout if a user has set a config 
> option. 

That addresses my concerns.


https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] DebugInfoD tests + fixing issues exposed by tests (PR #85693)

2024-03-22 Thread Omair Javaid via lldb-commits

omjavaid wrote:

both commits from this PR broke LLDB buildbots on Arm and AArch64 Linux.
New tests apparently are failing on Arm/AArch64 Linux.
https://lab.llvm.org/buildbot/#/builders/96/builds/54867
https://lab.llvm.org/buildbot/#/builders/17/builds/50824

I will be reverting 
[b1575f9](https://github.com/llvm/llvm-project/commit/b1575f9082071702bd6aaa2600ce9fe011a091e9)
[6d939a6](https://github.com/llvm/llvm-project/commit/6d939a6ec69adf284cdbef2034b49fd02ba503fc)


https://github.com/llvm/llvm-project/pull/85693
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 4406e4a - Revert "Missed a null-ptr check in previous PR for Debuginfod testing (#86292)"

2024-03-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-03-23T03:31:25+05:00
New Revision: 4406e4a8bd5acadd980d84356b36030cadf9a61d

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

LOG: Revert "Missed a null-ptr check in previous PR for Debuginfod testing 
(#86292)"

This reverts commit b1575f9082071702bd6aaa2600ce9fe011a091e9.

Added: 


Modified: 
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp 
b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index a9956aa9075fe2..91b8b4a979e0c7 100644
--- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -53,7 +53,7 @@ static bool IsDwpSymbolFile(const lldb::ModuleSP &module_sp,
   ObjectFileSP dwp_obj_file = ObjectFile::FindPlugin(
   module_sp, &file_spec, 0, FileSystem::Instance().GetByteSize(file_spec),
   dwp_file_data_sp, dwp_file_data_offset);
-  if (!dwp_obj_file || !ObjectFileELF::classof(dwp_obj_file.get()))
+  if (!ObjectFileELF::classof(dwp_obj_file.get()))
 return false;
   // The presence of a debug_cu_index section is the key identifying feature of
   // a DWP file. Make sure we don't fill in the section list on dwp_obj_file



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


[Lldb-commits] [lldb] 7fc2fbb - Revert "DebugInfoD tests + fixing issues exposed by tests (#85693)"

2024-03-22 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2024-03-23T03:31:56+05:00
New Revision: 7fc2fbb3f1961e0ad0722c2d749ddd6264195a1c

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

LOG: Revert "DebugInfoD tests + fixing issues exposed by tests (#85693)"

This reverts commit 6d939a6ec69adf284cdbef2034b49fd02ba503fc.

This broke following LLDB bots:
https://lab.llvm.org/buildbot/#/builders/96/builds/54867
https://lab.llvm.org/buildbot/#/builders/17/builds/50824

Added: 


Modified: 
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolLocator/CMakeLists.txt
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Removed: 
lldb/test/API/debuginfod/Normal/Makefile
lldb/test/API/debuginfod/Normal/TestDebuginfod.py
lldb/test/API/debuginfod/Normal/main.c
lldb/test/API/debuginfod/SplitDWARF/Makefile
lldb/test/API/debuginfod/SplitDWARF/TestDebuginfodDWP.py
lldb/test/API/debuginfod/SplitDWARF/main.c



diff  --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules 
b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 75efcde1f04023..bfd249ccd43f2e 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -51,7 +51,7 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
 #
 # GNUWin32 uname gives "windows32" or "server version windows32" while
 # some versions of MSYS uname return "MSYS_NT*", but most environments
-# standardize on "Windows_NT", so we'll make it consistent here.
+# standardize on "Windows_NT", so we'll make it consistent here. 
 # When running tests from Visual Studio, the environment variable isn't
 # inherited all the way down to the process spawned for make.
 #--
@@ -210,12 +210,6 @@ else
ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
DSYM = $(EXE).debug
endif
-
-   ifeq "$(MAKE_DWP)" "YES"
-   MAKE_DWO := YES
-   DWP_NAME = $(EXE).dwp
-   DYLIB_DWP_NAME = $(DYLIB_NAME).dwp
-   endif
 endif
 
 LIMIT_DEBUG_INFO_FLAGS =
@@ -363,7 +357,6 @@ ifneq "$(OS)" "Darwin"
 
OBJCOPY ?= $(call replace_cc_with,objcopy)
ARCHIVER ?= $(call replace_cc_with,ar)
-   DWP ?= $(call replace_cc_with,dwp)
override AR = $(ARCHIVER)
 endif
 
@@ -534,10 +527,6 @@ ifneq "$(CXX)" ""
endif
 endif
 
-ifeq "$(GEN_GNU_BUILD_ID)" "YES"
-   LDFLAGS += -Wl,--build-id
-endif
-
 #--
 # DYLIB_ONLY variable can be used to skip the building of a.out.
 # See the sections below regarding dSYM file as well as the building of
@@ -576,25 +565,11 @@ else
 endif
 else
 ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
-ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
-   cp "$(EXE)" "$(EXE).full"
-endif
$(OBJCOPY) --only-keep-debug "$(EXE)" "$(DSYM)"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DSYM)" "$(EXE)" "$(EXE)"
 endif
-ifeq "$(MAKE_DWP)" "YES"
-   $(DWP) -o "$(DWP_NAME)" $(DWOS)
-endif
 endif
 
-
-#--
-# Support emitting the content of the GNU build-id into a file
-# This needs to be used in conjunction with GEN_GNU_BUILD_ID := YES
-#--
-$(EXE).uuid : $(EXE)
-   $(OBJCOPY) --dump-section=.note.gnu.build-id=$@ $<
-
 #--
 # Make the dylib
 #--
@@ -635,15 +610,9 @@ endif
 else
$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -shared -o "$(DYLIB_FILENAME)"
 ifeq "$(SPLIT_DEBUG_SYMBOLS)" "YES"
-   ifeq "$(SAVE_FULL_DEBUG_BINARY)" "YES"
-   cp "$(DYLIB_FILENAME)" "$(DYLIB_FILENAME).full"
-   endif
$(OBJCOPY) --only-keep-debug "$(DYLIB_FILENAME)" 
"$(DYLIB_FILENAME).debug"
$(OBJCOPY) --strip-debug --add-gnu-debuglink="$(DYLIB_FILENAME).debug" 
"$(DYLIB_FILENAME)" "$(DYLIB_FILENAME)"
 endif
-ifeq "$(MAKE_DWP)" "YES"
-   $(DWP) -o $(DYLIB_DWP_FILE) $(DYLIB_DWOS)
-endif
 endif
 
 #--

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 08ce7b82b0c16a..5f67658f86ea96 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -4377,38 +4377,26 @@ const std::shared_ptr 
&SymbolFileDWARF::GetDwpSymbolFile() {
 FileSpecList search_paths = Target::GetDefaultDebugFil

[Lldb-commits] [lldb] [lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (PR #86359)

2024-03-22 Thread Jason Molenda via lldb-commits

https://github.com/jasonmolenda created 
https://github.com/llvm/llvm-project/pull/86359

It is possible to gather code coverage in a firmware environment, where the 
__LLVM_COV segment will not be mapped in memory but does exist in the binary, 
see
https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf

The __LLVM_COV segment in the binary happens to be at the same address as the 
__DATA segment, so if lldb treats this segment as loaded, it shadows the __DATA 
segment and address->symbol resolution can fail.

For these non-userland code cases, we need to mark __LLVM_COV as not a loadable 
segment.

rdar://124475661

>From 47bf1259289986cdc0df706aa40a18e58e94eee5 Mon Sep 17 00:00:00 2001
From: Jason Molenda 
Date: Fri, 22 Mar 2024 16:31:07 -0700
Subject: [PATCH] [lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware
 memory

It is possible to gather code coverage in a firmware environment,
where the __LLVM_COV segment will not be mapped in memory but does
exist in the binary, see
https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf

The __LLVM_COV segment in the binary happens to be at the same
address as the __DATA segment, so if lldb treats this segment as
loaded, it shadows the __DATA segment and address->symbol resolution
can fail.

For these non-userland code cases, we need to mark __LLVM_COV as
not a loadable segment.

rdar://124475661
---
 .../Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp| 12 
 .../Plugins/ObjectFile/Mach-O/ObjectFileMachO.h  |  1 +
 2 files changed, 13 insertions(+)

diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index bcf3a3274cf3a0..1caf93659956b4 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -905,6 +905,11 @@ ConstString ObjectFileMachO::GetSegmentNameDWARF() {
   return g_section_name;
 }
 
+ConstString ObjectFileMachO::GetSegmentNameLLVM_COV() {
+  static ConstString g_section_name("__LLVM_COV");
+  return g_section_name;
+}
+
 ConstString ObjectFileMachO::GetSectionNameEHFrame() {
   static ConstString g_section_name_eh_frame("__eh_frame");
   return g_section_name_eh_frame;
@@ -6145,6 +6150,13 @@ bool ObjectFileMachO::SectionIsLoadable(const Section 
*section) {
 return false;
   if (GetModule().get() != section->GetModule().get())
 return false;
+  // firmware style binaries with llvm gcov segment do
+  // not have that segment mapped into memory.
+  if (section->GetName() == GetSegmentNameLLVM_COV()) {
+const Strata strata = GetStrata();
+if (strata == eStrataKernel || strata == eStrataRawImage)
+  return false;
+  }
   // Be careful with __LINKEDIT and __DWARF segments
   if (section->GetName() == GetSegmentNameLINKEDIT() ||
   section->GetName() == GetSegmentNameDWARF()) {
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index 0a47f3a7dd1861..55bc688126eb36 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -271,6 +271,7 @@ class ObjectFileMachO : public lldb_private::ObjectFile {
   static lldb_private::ConstString GetSegmentNameOBJC();
   static lldb_private::ConstString GetSegmentNameLINKEDIT();
   static lldb_private::ConstString GetSegmentNameDWARF();
+  static lldb_private::ConstString GetSegmentNameLLVM_COV();
   static lldb_private::ConstString GetSectionNameEHFrame();
 
   llvm::MachO::dysymtab_command m_dysymtab;

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


[Lldb-commits] [lldb] [lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (PR #86359)

2024-03-22 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Jason Molenda (jasonmolenda)


Changes

It is possible to gather code coverage in a firmware environment, where the 
__LLVM_COV segment will not be mapped in memory but does exist in the binary, 
see
https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf

The __LLVM_COV segment in the binary happens to be at the same address as the 
__DATA segment, so if lldb treats this segment as loaded, it shadows the __DATA 
segment and address->symbol resolution can fail.

For these non-userland code cases, we need to mark __LLVM_COV as not a loadable 
segment.

rdar://124475661

---
Full diff: https://github.com/llvm/llvm-project/pull/86359.diff


2 Files Affected:

- (modified) lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (+12) 
- (modified) lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (+1) 


``diff
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index bcf3a3274cf3a0..1caf93659956b4 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -905,6 +905,11 @@ ConstString ObjectFileMachO::GetSegmentNameDWARF() {
   return g_section_name;
 }
 
+ConstString ObjectFileMachO::GetSegmentNameLLVM_COV() {
+  static ConstString g_section_name("__LLVM_COV");
+  return g_section_name;
+}
+
 ConstString ObjectFileMachO::GetSectionNameEHFrame() {
   static ConstString g_section_name_eh_frame("__eh_frame");
   return g_section_name_eh_frame;
@@ -6145,6 +6150,13 @@ bool ObjectFileMachO::SectionIsLoadable(const Section 
*section) {
 return false;
   if (GetModule().get() != section->GetModule().get())
 return false;
+  // firmware style binaries with llvm gcov segment do
+  // not have that segment mapped into memory.
+  if (section->GetName() == GetSegmentNameLLVM_COV()) {
+const Strata strata = GetStrata();
+if (strata == eStrataKernel || strata == eStrataRawImage)
+  return false;
+  }
   // Be careful with __LINKEDIT and __DWARF segments
   if (section->GetName() == GetSegmentNameLINKEDIT() ||
   section->GetName() == GetSegmentNameDWARF()) {
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index 0a47f3a7dd1861..55bc688126eb36 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -271,6 +271,7 @@ class ObjectFileMachO : public lldb_private::ObjectFile {
   static lldb_private::ConstString GetSegmentNameOBJC();
   static lldb_private::ConstString GetSegmentNameLINKEDIT();
   static lldb_private::ConstString GetSegmentNameDWARF();
+  static lldb_private::ConstString GetSegmentNameLLVM_COV();
   static lldb_private::ConstString GetSectionNameEHFrame();
 
   llvm::MachO::dysymtab_command m_dysymtab;

``




https://github.com/llvm/llvm-project/pull/86359
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (PR #86359)

2024-03-22 Thread via lldb-commits

github-actions[bot] wrote:



:white_check_mark: With the latest revision this PR passed the C/C++ code 
formatter.

https://github.com/llvm/llvm-project/pull/86359
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] [ObjectFileMachO] LLVM_COV is not mapped into firmware memory (PR #86359)

2024-03-22 Thread via lldb-commits

github-actions[bot] wrote:



:white_check_mark: With the latest revision this PR passed the Python code 
formatter.

https://github.com/llvm/llvm-project/pull/86359
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Mehdi Amini via lldb-commits

joker-eph wrote:

LGTM overall, but the CI failure looks real.

https://github.com/llvm/llvm-project/pull/86318
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits