[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123340 Many (most?) uses of SC::GetAddressRange were not interested in the range, but in the address of the function/symbol contained inside the symbol context. They were getting that by calling the GetBaseAddress on t

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123340 >From 2d6210ad9527df5147987f856e941e61d9851a97 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 17 Jan 2025 12:36:36 +0100 Subject: [PATCH 1/2] [lldb] Add SymbolContext::GetAddress Many (most?) uses of SC:

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -370,6 +370,31 @@ bool SymbolContext::GetAddressRange(uint32_t scope, uint32_t range_idx, return false; } +Address SymbolContext::GetAddress(uint32_t scope, + bool use_inline_block_range) const { + if ((scope & eSymbolContextLineEntry) &

[Lldb-commits] [lldb] 58fc802 - [lldb] Skip TestStepUntilAPI on !x86_64, !aarch64

2025-01-17 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2025-01-17T13:07:06+01:00 New Revision: 58fc8029e91bf56811444d4a37a8f517a43bdc11 URL: https://github.com/llvm/llvm-project/commit/58fc8029e91bf56811444d4a37a8f517a43bdc11 DIFF: https://github.com/llvm/llvm-project/commit/58fc8029e91bf56811444d4a37a8f517a43bdc11.diff

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/123046 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Enable "frame diagnose" on linux (PR #123217)

2025-01-17 Thread Pavel Labath via lldb-commits
labath wrote: > I see you changed the MTE core file case, there is a live process test case > too, a search for `fault address:` should find it and any others. Done, and I've changed a couple of extra strings as well https://github.com/llvm/llvm-project/pull/123217

[Lldb-commits] [lldb] [lldb] Enable "frame diagnose" on linux (PR #123217)

2025-01-17 Thread Pavel Labath via lldb-commits
labath wrote: > We could make MacOS adopt the Linux format, right? Not that that changes much > but just wondering if there's any reason you chose that direction. The reason I chose this direction is because I still think of MacOS as the "reference platform" for lldb, but now that I've thought

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/7] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [lldb] Enable "frame diagnose" on linux (PR #123217)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -10,7 +10,7 @@ class TestDiagnoseDereferenceFunctionReturn(TestBase): -@skipUnlessDarwin +@expectedFailureAll(oslist=no_match(lldbplatformutil.getDarwinOSTriples())) labath wrote: Yep https://github.com/llvm/llvm-project/pull/123217 _

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -859,7 +859,9 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame, addr_t step_addr = sc.line_entry.range.GetBaseAddress().GetLoadAddress(target); if (step_addr != LLDB_INVALID_ADDRESS) { -if (fun_range.ContainsLoadAddress(step_addr, targ

[Lldb-commits] [clang] [lldb] [llvm] Extending LLDB to work on AIX (PR #102601)

2025-01-17 Thread Pavel Labath via lldb-commits
labath wrote: (I'm going to remove all the labels to try to avoid pinging everyone each time you rebase) https://github.com/llvm/llvm-project/pull/102601 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (PR #123089)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/123089 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Change GetAttributes to always visit current DIE before recursing (PR #123261)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/123261 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARF] Change GetAttributes to always visit current DIE before recursing (PR #123261)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -309,10 +319,10 @@ void DWARFDebugInfoEntry::GetAttributes(DWARFUnit *cu, switch (attr) { case DW_AT_sibling: case DW_AT_declaration: - if (curr_depth > 0) { + if (seen.size() > 1 && !is_first_die) { labath wrote: ```suggestion i

[Lldb-commits] [lldb] [lldb][DWARF] Change GetAttributes to always visit current DIE before recursing (PR #123261)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -339,6 +348,39 @@ void DWARFDebugInfoEntry::GetAttributes(DWARFUnit *cu, DWARFFormValue::SkipValue(form, data, &offset, cu); } } + + return true; +} + +DWARFAttributes DWARFDebugInfoEntry::GetAttributes(const DWARFUnit *cu, +

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,35 @@ +"""Test the SBProgress API.""" + +import lldb +from lldbsuite.test.lldbtest import * + + +class SBProgressTestCase(TestBase): +def test_with_external_bit_set(self): +"""Test SBProgress events are listened to when the external bit is set.""" + +

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,68 @@ +//===-- SBProgress.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: Apa

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/119052 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2025-01-17 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,68 @@ +//===-- SBProgress.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: Apa

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2025-01-17 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. I think this is fine. I was thinking this could be implemented purely from the python side by sending the appropriate events manually, but this doesn't work because we don't have the ability to construct the right kind of event objects. We

[Lldb-commits] [lldb] [lldb] Remove (unused) SymbolContext::Dump (PR #123211)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/123211 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Enable "frame diagnose" on linux (PR #123217)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123217 .. by changing the signal stop reason format :facepalm: The reason this did not work is because the code in `StopInfo::GetCrashingDereference` was looking for the string "address=" to extract the address of the

[Lldb-commits] [lldb] [lldb] Remove (unused) SymbolContext::Dump (PR #123211)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123211 We still have GetDescription and DumpStopContext which serve a similar purpose. (The main reason this is bothering me is because I'm working through the uses of (deprecated) Function::GetAddressRange.) >From 5c

[Lldb-commits] [lldb] [lldb] Remove some unused code in SymbolFileDWARF::ResolveFunction (PR #123206)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123206 The purpose of this originally was to check for DWARF which refers to garbage-collected functions (by checking whether we're able to get a good address out of the function). The address check has been removed in

[Lldb-commits] [lldb] [DO NOT SUBMIT] querying precommit CI... (PR #123178)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/123178 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (PR #123089)

2025-01-16 Thread Pavel Labath via lldb-commits
@@ -377,7 +377,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) { break; case DW_AT_object_pointer: - object_pointer = form_value.Reference(); + // GetAttributes follows DW_AT_specification. + // DW_TAG_subprogram defini

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/6] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/5] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/4] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (PR #123089)

2025-01-16 Thread Pavel Labath via lldb-commits
@@ -377,7 +377,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) { break; case DW_AT_object_pointer: - object_pointer = form_value.Reference(); + // GetAttributes follows DW_AT_specification. + // DW_TAG_subprogram defini

[Lldb-commits] [lldb] [DO NOT SUBMIT] querying precommit CI... (PR #123178)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123178 None >From da349663bf90a53e50ad6d22a088e19edfb9ee83 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 16 Jan 2025 11:08:00 +0100 Subject: [PATCH] [DO NOT SUBMIT] querying precommit CI... --- lldb/test/She

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/123054 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (PR #123089)

2025-01-16 Thread Pavel Labath via lldb-commits
@@ -377,7 +377,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) { break; case DW_AT_object_pointer: - object_pointer = form_value.Reference(); + // GetAttributes follows DW_AT_specification. + // DW_TAG_subprogram defini

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
@@ -859,7 +859,9 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame, addr_t step_addr = sc.line_entry.range.GetBaseAddress().GetLoadAddress(target); if (step_addr != LLDB_INVALID_ADDRESS) { -if (fun_range.ContainsLoadAddress(step_addr, targ

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,134 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class StepUntilTestCase(TestBase): labath wrote: I'm not sure I *need* to (I vaguely recollect we changed what

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-16 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/3] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [LLDB][NFC] Calculate the region size of an in memory image if size isn't specified (PR #123148)

2025-01-16 Thread Pavel Labath via lldb-commits
labath wrote: The reason this code looks the way it does is that we've had crashes when trying to read corrupted elf files from memory, where we load the size of the elf file from the process memory, find that out that it's size is 935872395 GB, try to allocate a host buffer of that size, and

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't overwrite DW_AT_object_pointer of definition with that of a declaration (PR #123089)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -377,7 +377,12 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) { break; case DW_AT_object_pointer: - object_pointer = form_value.Reference(); + // GetAttributes follows DW_AT_specification. + // DW_TAG_subprogram defini

[Lldb-commits] [lldb] [WIP][RFC][lldb] faster indexing (PR #122128)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/122128 >From f6aee6ad61745e20079d7d56a643dc61a49132b8 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 8 Jan 2025 15:27:30 + Subject: [PATCH] faster indexing --- .../Plugins/SymbolFile/DWARF/DWARFUnit.h

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -401,12 +399,28 @@ static CompilerContext GetContextEntry(DWARFDIE die) { return ctx(CompilerContextKind::Typedef); case DW_TAG_base_type: return ctx(CompilerContextKind::Builtin); + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type:

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -401,12 +399,28 @@ static CompilerContext GetContextEntry(DWARFDIE die) { return ctx(CompilerContextKind::Typedef); case DW_TAG_base_type: return ctx(CompilerContextKind::Builtin); + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type:

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123054 >From 1aff68c333c9a12a4b67cca717eba6d96d4afb5a Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 20 Nov 2024 14:37:37 +0100 Subject: [PATCH 1/3] [lldb] Fix lookup of types in anonymous namespaces with -gsim

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -376,7 +378,8 @@ lldb_private::Type *DWARFDIE::ResolveTypeUID(const DWARFDIE &die) const { return nullptr; } -static CompilerContext GetContextEntry(DWARFDIE die) { +static CompilerContext GetContextEntry(DWARFDIE die, + bool complet

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -2740,18 +2738,11 @@ void SymbolFileDWARF::FindTypes(const TypeQuery &query, TypeResults &results) { // Copy our match's context and update the basename we are looking for // so we can use this only to compare the context correctly. m_index->GetTypesWithQu

[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123054 Anonymous namespaces are supposed to be optional when looking up types. This was not working in combination with -gsimple-template-names, because the way it was constructing the complete (with template args) nam

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123046 >From 74d436310319d17cb43ba598836b70a92c827111 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 15 Jan 2025 12:41:23 +0100 Subject: [PATCH 1/2] [lldb] Fix SBThread::StepOverUntil for discontinuous function

[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/123046 I think the only issue here was that we would erroneously consider functions which are "in the middle" of the function were stepping to as a part of the function, and would try to step into them (likely stepping

[Lldb-commits] [lldb] [lldb] Implement (SB)Function::GetInstructions for discontinuous functions (PR #122933)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/122933 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement (SB)Function::GetInstructions for discontinuous functions (PR #122933)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/122933 >From dd5dba70fe99d2510e9e1903b7f1f9a141f1572d Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 14 Jan 2025 17:17:28 +0100 Subject: [PATCH 1/2] [lldb] Implement (SB)Function::GetInstructions for discontinu

[Lldb-commits] [lldb] [lldb] Implement (SB)Function::GetInstructions for discontinuous functions (PR #122933)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -165,10 +169,14 @@ bool SBInstructionList::GetDescription(Stream &sref) { addr, eSymbolContextEverything, sc); } +if (next_addr && addr != next_addr) labath wrote: It doesn't *need* to be because `std::optional` defines an ope

[Lldb-commits] [lldb] [lldb] Add OpenBSD signals (PR #123005)

2025-01-15 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/123005 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-01-15 Thread Pavel Labath via lldb-commits
@@ -511,22 +513,58 @@ ValueObjectSP StackFrame::GetValueForVariableExpressionPath( VariableSP &var_sp, Status &error) { ExecutionContext exe_ctx; CalculateExecutionContext(exe_ctx); + bool use_DIL = exe_ctx.GetTargetRef().GetUseDIL(&exe_ctx); + if (use_DIL)

[Lldb-commits] [lldb] [lldb][test] Fix some 'import-std-module' tests (PR #122358)

2025-01-15 Thread Pavel Labath via lldb-commits
labath wrote: This looks like some sort of a problem with the test infrastructure. It thinks the test "passed unexpectedly" even though it has no "expected failure" annotations and the test itself reports it succeeded. https://github.com/llvm/llvm-project/pull/122358 __

[Lldb-commits] [lldb] [lldb] Implement (SB)Function::GetInstructions for discontinuous functions (PR #122933)

2025-01-14 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/122933 The main change is to permit the disassembler class to process/store multiple (discontinuous) ranges of addresses. The result is not ambiguous because each instruction knows its size (in addition to its address)

[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #122783)

2025-01-14 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/122783 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #122783)

2025-01-14 Thread Pavel Labath via lldb-commits
@@ -10,22 +10,46 @@ class DAPTestCaseBase(TestBase): # set timeout based on whether ASAN was enabled or not. Increase # timeout by a factor of 10 if ASAN is enabled. -timeoutval = 10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1) +timeoutval = 10 * (10 if ("ASA

[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #122783)

2025-01-14 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Were you able to reproduce the windows failure (and confirm the problem was indeed in the pipe code), or is this an attempt at speculation? https://github.com/llvm/llvm-project/pull/122783 ___ lldb-commits mailing

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-01-14 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/120971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-01-14 Thread Pavel Labath via lldb-commits
@@ -511,22 +513,58 @@ ValueObjectSP StackFrame::GetValueForVariableExpressionPath( VariableSP &var_sp, Status &error) { ExecutionContext exe_ctx; CalculateExecutionContext(exe_ctx); + bool use_DIL = exe_ctx.GetTargetRef().GetUseDIL(&exe_ctx); + if (use_DIL)

[Lldb-commits] [lldb] [lldb] Reduce duplication in two of DWARFDIE context functions (PR #122712)

2025-01-14 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/122712 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] Debuginfod cache use index cache settings and include real file name (PR #120814)

2025-01-13 Thread Pavel Labath via lldb-commits
labath wrote: Same here, and the lldb debuginfod test is failing as well: ``` == FAIL: test_debuginfod_executable (TestDebuginfod.DebugInfodTests.test_debuginfod_executable) Test behavior with the full binary available from D

[Lldb-commits] [lldb] [lldb] Reduce duplication in two of DWARFDIE context functions (PR #122712)

2025-01-13 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/122712 This doesn't make much of a difference now, but it makes it easier to add -gsimple-template-names support to these functions (the idea is to add an argument to say whether you want the name as spelled in the deb

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-13 Thread Pavel Labath via lldb-commits
@@ -2393,10 +2393,29 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF( assert(func_type == nullptr || func_type != DIE_IS_BEING_PARSED); const user_id_t func_user_id = die.GetID(); + +// The base address of the scope for any of the debugging information +

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-13 Thread Pavel Labath via lldb-commits
@@ -428,7 +428,7 @@ class Function : public UserID, public SymbolContextScope { /// The section offset based address for this function. Function(CompileUnit *comp_unit, lldb::user_id_t func_uid, lldb::user_id_t func_type_uid, const Mangled &mangled, -

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-13 Thread Pavel Labath via lldb-commits
@@ -428,7 +428,7 @@ class Function : public UserID, public SymbolContextScope { /// The section offset based address for this function. Function(CompileUnit *comp_unit, lldb::user_id_t func_uid, lldb::user_id_t func_type_uid, const Mangled &mangled, -

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-13 Thread Pavel Labath via lldb-commits
@@ -3,17 +3,30 @@ # int baz(); # int bar() { return 47; } # int foo(int flag) { return flag ? bar() : baz(); } -# The function bar has been placed "in the middle" of foo. +# The function bar has been placed "in the middle" of foo, and the function +# entry point is deliberately

[Lldb-commits] [lldb] [lldb][OpenBSD] Fixes for process handling (PR #122534)

2025-01-13 Thread Pavel Labath via lldb-commits
@@ -40,49 +40,63 @@ class ProcessLaunchInfo; static bool GetOpenBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr, ProcessInstanceInfo &process_info) { - if (process_info.ProcessIDIsValid()) { -int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_

[Lldb-commits] [lldb] f44ed64 - [lldb] Fix some log messages in NativeProcessLinux

2025-01-10 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2025-01-10T13:21:58+01:00 New Revision: f44ed64864642b008f0c757a5ff37c150ce47d48 URL: https://github.com/llvm/llvm-project/commit/f44ed64864642b008f0c757a5ff37c150ce47d48 DIFF: https://github.com/llvm/llvm-project/commit/f44ed64864642b008f0c757a5ff37c150ce47d48.diff

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-10 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/122440 >From be424b1e32f0bc69d01bd582e1de51b66b920b25 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 10 Jan 2025 10:44:53 +0100 Subject: [PATCH 1/2] [lldb] Use the first address range as the function address T

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-10 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/122440 This is the behavior expected by DWARF. It also requires some fixups to algorithms which were storing the addresses of some objects (Blocks and Variables) relative to the beginning of the function. There are pl

[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)

2025-01-10 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/115836 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)

2025-01-10 Thread Pavel Labath via lldb-commits
labath wrote: The reason I picked this name is to match Symbol::GetAddress. https://github.com/llvm/llvm-project/pull/115836 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Fix some 'import-std-module' tests (PR #122358)

2025-01-10 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Yes, that's the general idea. Just add a comment about why this is being done. If this ends up failing in some configuration, there are plenty of other (more indirect) ways of pulling in this symbol that we can try. https://github.com/llvm/

[Lldb-commits] [lldb] [lldb] Regularize DWARFDIE::Get{TypeLookup, Decl}Context names (PR #122273)

2025-01-10 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/122273 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Regularize DWARFDIE::Get{TypeLookup, Decl}Context names (PR #122273)

2025-01-09 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/122273 The functions call GetName for everything except variables, where they call GetPubname instead. The difference is that the latter prefers to return the linkage name, if it is available. This doesn't seem partic

[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)

2025-01-09 Thread Pavel Labath via lldb-commits
@@ -407,6 +406,15 @@ CompileUnit *Function::GetCompileUnit() { return m_comp_unit; } const CompileUnit *Function::GetCompileUnit() const { return m_comp_unit; } +Address Function::GetAddress() const { + if (m_ranges.empty()) +return Address(); + // We're using a (DWARF

[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)

2025-01-09 Thread Pavel Labath via lldb-commits
https://github.com/labath ready_for_review https://github.com/llvm/llvm-project/pull/115836 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)

2025-01-09 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/115836 >From 3053907387634c8b0be9667441535828b034a3db Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 12 Nov 2024 10:17:42 +0100 Subject: [PATCH] [lldb] Add Function::GetAddress and redirect some uses Many calls

[Lldb-commits] [lldb] [lldb] Store *signed* ranges in lldb_private::Block (PR #120224)

2025-01-09 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/120224 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-01-09 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,117 @@ +//===-- DILEval.cpp ---===// +// +// 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: Ap

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-01-09 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,191 @@ +//===-- DILLexer.cpp --===// +// +// 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: Ap

[Lldb-commits] [lldb] [lldb] Move GetEnvironment function into common code (PR #122173)

2025-01-08 Thread Pavel Labath via lldb-commits
@@ -114,6 +114,12 @@ void LogChannelSystem::Initialize() { void LogChannelSystem::Terminate() { g_system_log.Disable(); } #if !defined(__APPLE__) && !defined(_WIN32) +extern "C" { +extern char **environ; +} labath wrote: ```suggestion extern "C" char **enviro

[Lldb-commits] [lldb] [lldb] Move GetEnvironment function into common code (PR #122173)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks. https://github.com/llvm/llvm-project/pull/122173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Move GetEnvironment function into common code (PR #122173)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/122173 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [WIP][RFC][lldb] faster indexing (PR #122128)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/122128 None >From b534596aa6d7c2c38610d8b32a06ca7a8c6857f5 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 8 Jan 2025 15:27:30 + Subject: [PATCH] faster indexing --- .../Plugins/SymbolFile/DWARF/DWARFUnit.

[Lldb-commits] [lldb] [lldb][AIX] Some base #if _AIX changes of a minimal lldb build (PR #120979)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/120979 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Some base #if _AIX changes of a minimal lldb build (PR #120979)

2025-01-08 Thread Pavel Labath via lldb-commits
@@ -14,6 +14,7 @@ #include #include +#include labath wrote: If bzero is out, then the header should go out as well (unless it used for other things, but I don't see anything like that). If anyone wants to reintroduce bzero, they can/should re-add the hea

[Lldb-commits] [lldb] [lldb][OpenBSD] Make use of Environment class (PR #122040)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. If you feel up to it, you could also put into the common code (under `#if !APPLE && !WINDOWS`) and delete the implementations in other OSes as well. https://github.com/llvm/llvm-project/pull/122040 ___

[Lldb-commits] [lldb] [lldb][OpenBSD][NFC] Replace tab with spaces (PR #122041)

2025-01-08 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/122041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix address to read segment data (PR #120655)

2025-01-07 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Yes, that looks about right, though it's unfortunate that this does not have any test case. I would really recommend you figure out a testing strategy for this -- for your benefit (less chance of other changes breaking this use case) if no

[Lldb-commits] [lldb] [lldb][Posix] Remove unused includes in file system (PR #121913)

2025-01-07 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/121913 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AIX] Added PlatformAIX plugin (PR #121273)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,370 @@ +//===-- PlatformAIX.cpp -===// +// +// 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: Apach

[Lldb-commits] [lldb] [lldb][AIX] Added PlatformAIX plugin (PR #121273)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,370 @@ +//===-- PlatformAIX.cpp -===// +// +// 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: Apach

[Lldb-commits] [lldb] [lldb][AIX] Added PlatformAIX plugin (PR #121273)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,370 @@ +//===-- PlatformAIX.cpp -===// +// +// 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: Apach

[Lldb-commits] [lldb] [lldb][AIX] Added PlatformAIX plugin (PR #121273)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,370 @@ +//===-- PlatformAIX.cpp -===// +// +// 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: Apach

[Lldb-commits] [lldb] [llvm] [LLDB][Minidump] Make workaround for the Dynamic loader issue (PR #120166)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -89,8 +89,11 @@ Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() { "Failed to fill in header and directory " "sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")", new_offset, m_saved_data_size); - return error; + if (error.Fai

[Lldb-commits] [lldb] Fixing FindUnusedPort method tcp_socket object creation with proper constructor parameter (PR #121879)

2025-01-07 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks for the fix. Should I press the "merge" button for you? https://github.com/llvm/llvm-project/pull/121879 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [lldb] [lldb][AIX] Some base #if _AIX changes of a minimal lldb build (PR #120979)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -16,6 +16,9 @@ #include #include #include +#ifdef _AIX +#include labath wrote: (I see you've already done that, so no point in backing it out, but I'll note that some people like to do a wholesale `s/memset(0)/bzero` because the second one is supposed

[Lldb-commits] [lldb] [lldb][AIX] Some base #if _AIX changes of a minimal lldb build (PR #120979)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -715,7 +715,7 @@ ConnectionFileDescriptor::ConnectFD(llvm::StringRef s, ConnectionStatus ConnectionFileDescriptor::ConnectFile( llvm::StringRef s, socket_id_callback_type socket_id_callback, Status *error_ptr) { -#if LLDB_ENABLE_POSIX +#if LLDB_ENABLE_POSIX && !defin

[Lldb-commits] [lldb] [lldb][AIX] Some base #if _AIX changes of a minimal lldb build (PR #120979)

2025-01-07 Thread Pavel Labath via lldb-commits
@@ -11,7 +11,9 @@ // C includes #include #include +#ifndef _AIX #include labath wrote: FWICS, this file isn't used even on linux. I'd try deleting it instead. https://github.com/llvm/llvm-project/pull/120979 __

  1   2   3   4   5   6   7   8   9   10   >