[Lldb-commits] [lldb] Modify ObjectFileELF so it can load notes from PT_NOTE segments. (PR #160652)

2025-09-24 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/160652 The ObjectFileELF parser was not able to load ELF notes from PT_NOTE program headers. This patch fixes ObjectFileELF::GetUUID() to check the program header and parse the notes in any PT_NOTE segments. This wil

[Lldb-commits] [lldb] [lldb][test] Unify and extend test infrastructure for checking CPU features (PR #153914)

2025-09-24 Thread David Spickett via lldb-commits
@@ -0,0 +1,68 @@ +""" +Platform-agnostic helper to query for CPU features. +""" + +import re + + +class CPUFeature: +def __init__(self, linux_cpu_info_flag: str = None, darwin_sysctl_key: str = None): +self.cpu_info_flag = linux_cpu_info_flag +self.sysctl_key

[Lldb-commits] [lldb] [lldb] Avoid copying header just to overwrite it (PR #160555)

2025-09-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Justin Cady (justincady) Changes The build script copies lldb-defines.h into the staging area but it gets overwritten by version-header-fix.py. This flow assumes that the lldb-defines.h from the source was writable originally (thus the copy

[Lldb-commits] [lldb] [lldb] Fix deadlock in parallel module loading with separate symbol thread pool (PR #160225)

2025-09-24 Thread via lldb-commits
GeorgeHuyubo wrote: > Fixes a deadlock that occurs during parallel module loading when symbol > indexing operations conflict with module list access. The deadlock happens > when: > > * Thread A (symbol loading): holds Module.m_mutex → tries > ModuleList.m_modules_mutex > * Thread B (parallel

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM, modulo few comments https://github.com/llvm/llvm-project/pull/149701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Oliver Hunt via lldb-commits
@@ -359,6 +366,16 @@ class DeclSpec { LLVM_PREFERRED_TYPE(TQ) unsigned TypeQualifiers : 5; // Bitwise OR of TQ. + // overflow behavior qualifiers + LLVM_PREFERRED_TYPE(bool) ojhunt wrote: @mizvekov so would I but there are so many non-enum classes I'm

[Lldb-commits] [lldb] [lldb][RISCV] Use uint64_t for emulating ADDI (PR #160550)

2025-09-24 Thread David Peixotto via lldb-commits
https://github.com/dmpots approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/160550 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Oliver Hunt via lldb-commits
ojhunt wrote: This comment became quite long, so I just want to add a preamble. First off, I'm sorry that I missed the RFC for this or I would have raised these objections then - If I did see it I would have blindly assumed that it was solely removing the UB nature of overflow, with no other s

[Lldb-commits] [lldb] [lldb][test] check if CoreDumping info is supported (PR #160333)

2025-09-24 Thread Jacob Lalonde via lldb-commits
Jlalond wrote: > CoreDumping in /proc/pid/stat was added in kernel 4.15, this causes the test > to fail in older kernel versions. see > https://man7.org/linux/man-pages/man5/proc_pid_status.5.html Note, it's `/proc/pid/status` not stat for the coredumping field. https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [lldb][test] check if CoreDumping info is supported (PR #160333)

2025-09-24 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond approved this pull request. https://github.com/llvm/llvm-project/pull/160333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
@@ -4043,6 +4043,33 @@ def note_cannot_use_trivial_abi_reason : Note< "it has a __weak field|it has a field of a non-trivial class type|" "it has an address-discriminated '__ptrauth' field}1">; +// OverflowBehavior attribute +def err_overflow_behavior_unknown_ident +:

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/148914 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
@@ -9744,6 +9744,16 @@ static void DiagnoseNarrowingInInitList(Sema &S, case NK_Constant_Narrowing: { // A constant value was narrowed. + +// Overflow behavior destination types with a 'wrap' kind can elide JustinStitt wrote: > Why is that a reasona

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Oliver Hunt via lldb-commits
@@ -9744,6 +9744,16 @@ static void DiagnoseNarrowingInInitList(Sema &S, case NK_Constant_Narrowing: { // A constant value was narrowed. + +// Overflow behavior destination types with a 'wrap' kind can elide ojhunt wrote: Why is that a reasonable ass

[Lldb-commits] [lldb] [vscode-lldb] Restart server when lldb-dap binary has changed (PR #159797)

2025-09-24 Thread Jeremy Day via lldb-commits
z2oh wrote: I started hitting an error about missing `chokidar` module today and came across this PR when searching. My error is: ``` 2025-09-24 10:57:12.237 [info] ExtensionService#_doActivateExtension llvm-vs-code-extensions.lldb-dap, startup: false, activationEvent: 'onLanguage:swift', root

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/148914 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
@@ -2845,6 +2866,41 @@ bool Sema::IsComplexPromotion(QualType FromType, QualType ToType) { ToComplex->getElementType()); } +bool Sema::IsOverflowBehaviorTypePromotion(QualType FromType, QualType ToType) { JustinStitt wrote: Yes the i

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
@@ -4043,6 +4043,33 @@ def note_cannot_use_trivial_abi_reason : Note< "it has a __weak field|it has a field of a non-trivial class type|" "it has an address-discriminated '__ptrauth' field}1">; +// OverflowBehavior attribute +def err_overflow_behavior_unknown_ident +:

[Lldb-commits] [clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-24 Thread Justin Stitt via lldb-commits
@@ -1146,23 +1161,16 @@ def Parentheses : DiagGroup<"parentheses", // - conversion warnings for literals are on by default // - bool-to-pointer conversion warnings are on by default // - __null-to-integer conversion warnings are on by default -def Conversion : DiagGroup<"

[Lldb-commits] [lldb] [lldb][RISCV] Use uint64_t for emulating ADDI (PR #160550)

2025-09-24 Thread Ivan Tadeu Ferreira Antunes Filho via lldb-commits
https://github.com/itf edited https://github.com/llvm/llvm-project/pull/160550 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Reland #158161 with cmake fix (PR #159842)

2025-09-24 Thread David Peixotto via lldb-commits
@@ -737,11 +801,44 @@ class Executor { bool operator()(SH inst) { return Store(m_emu, inst); } bool operator()(SW inst) { return Store(m_emu, inst); } bool operator()(ADDI inst) { -return transformOptional(inst.rs1.ReadI64(m_emu), - [&](int

[Lldb-commits] [lldb] [lldb][RISCV] Use uint64_t for emulating ADDI (PR #160550)

2025-09-24 Thread Ivan Tadeu Ferreira Antunes Filho via lldb-commits
https://github.com/itf updated https://github.com/llvm/llvm-project/pull/160550 >From 93420881a71412ffb92438c3eb0974c042316ba9 Mon Sep 17 00:00:00 2001 From: Ivan Tadeu Ferreira Antunes Filho Date: Wed, 24 Sep 2025 12:03:13 -0400 Subject: [PATCH] [lldb][RISCV] Use uint64_t for emulating ADDI In

[Lldb-commits] [lldb] [lldb][RISCV] Use uint64_t for emulating ADDI (PR #160550)

2025-09-24 Thread Ivan Tadeu Ferreira Antunes Filho via lldb-commits
https://github.com/itf edited https://github.com/llvm/llvm-project/pull/160550 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread via lldb-commits
https://github.com/Nerixyz closed https://github.com/llvm/llvm-project/pull/149701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [cmake][lldb][test] Respect LIBCXX_LIBDIR_SUBDIR (PR #159106)

2025-09-24 Thread LLVM Continuous Integration via lldb-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `lldb` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/21441 Here is the relevant piece of the build log

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/149701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Unify and extend test infrastructure for checking CPU features (PR #153914)

2025-09-24 Thread David Spickett via lldb-commits
@@ -0,0 +1,68 @@ +""" +Platform-agnostic helper to query for CPU features. +""" + +import re + + +class CPUFeature: +def __init__(self, linux_cpu_info_flag: str = None, darwin_sysctl_key: str = None): +self.cpu_info_flag = linux_cpu_info_flag +self.sysctl_key

[Lldb-commits] [lldb] [lldb][test] Unify and extend test infrastructure for checking CPU features (PR #153914)

2025-09-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: Fine with me once the comments are addressed. https://github.com/llvm/llvm-project/pull/153914 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread via lldb-commits
@@ -99,6 +99,16 @@ struct SegmentOffset { SegmentOffset(uint16_t s, uint32_t o) : segment(s), offset(o) {} uint16_t segment = 0; uint32_t offset = 0; + + bool operator==(SegmentOffset rhs) const { +return segment == rhs.segment && offset == rhs.offset; + } + + bool

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
@@ -99,6 +99,16 @@ struct SegmentOffset { SegmentOffset(uint16_t s, uint32_t o) : segment(s), offset(o) {} uint16_t segment = 0; uint32_t offset = 0; + + bool operator==(SegmentOffset rhs) const { +return segment == rhs.segment && offset == rhs.offset; + } + + bool

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
@@ -140,6 +140,9 @@ class SymbolFileNativePDB : public SymbolFileCommon { std::optional FindSymbolScope(PdbCompilandSymId id); + std::optional FindMangledFunctionName(PdbCompilandSymId id); + std::optional FindMangledSymbol(SegmentOffset so); Michael137 w

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/149701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][NativePDB] Create functions with mangled name (PR #149701)

2025-09-24 Thread Michael Buch via lldb-commits
@@ -501,7 +501,9 @@ lldb::FunctionSP SymbolFileNativePDB::CreateFunction(PdbCompilandSymId func_id, return nullptr; PdbTypeSymId sig_id(proc.FunctionType, false); - Mangled mangled(proc.Name); + auto mangled_opt = Michael137 wrote: nit: ```suggestion