Re: [Dwarf-discuss] Representing vtables in DWARF for downcasting

2025-04-23 Thread Kyle Huey via Dwarf-discuss
On Wed, Apr 23, 2025 at 7:46 PM Cary Coutant wrote: >> >> The first part of this is straightforward. The DWARF for Base will >> contain a member for the vtable pointer, and that plus knowledge of >> how the ABI lays out vtables allows the debugger to effectively do a >> dynamic_cast to obtain a po

Re: [Dwarf-discuss] Representing captured `this` in C++ lambdas

2025-04-23 Thread Kyle Huey via Dwarf-discuss
On Wed, Apr 23, 2025 at 3:14 PM David Blaikie wrote: > > > > On Wed, Apr 23, 2025 at 2:53 PM Kyle Huey wrote: >> >> On Wed, Apr 23, 2025 at 2:20 PM David Blaikie wrote: >> >> >> >> Do you object to anything I proposed other than removing the >> >> representation of the anonymous class compilers

Re: [Dwarf-discuss] Representing captured `this` in C++ lambdas

2025-04-23 Thread Kyle Huey via Dwarf-discuss
On Wed, Apr 23, 2025 at 2:20 PM David Blaikie wrote: >> >> Do you object to anything I proposed other than removing the >> representation of the anonymous class compilers generate for lambdas? > > > I'm not a /super/ fan of introducing a bunch of locals in addition to the > member descriptions -

Re: [Dwarf-discuss] Representing vtables in DWARF for downcasting

2025-04-23 Thread Kyle Huey via Dwarf-discuss
n the DWARF to the vtable pointer which I haven't considered and don't immediately see a use case for). - Kyle > If we could simplify that part of LLDB that'd be great! > > On Wed, 23 Apr 2025 at 16:32, Kyle Huey via Dwarf-discuss > wrote: > > > >

[Dwarf-discuss] Representing vtables in DWARF for downcasting

2025-04-23 Thread Kyle Huey via Dwarf-discuss
Consider the following C++ program #include class Base { public: virtual const char* method1() = 0; void method2() { printf("%s\n", method1()); } }; class DerivedOne : public Base { virtual const char* method1() override { return "DerivedOne"; } }; template class DerivedTwo :

Re: [Dwarf-discuss] Representing captured `this` in C++ lambdas

2025-04-22 Thread Kyle Huey via Dwarf-discuss
On Wed, Apr 16, 2025 at 2:10 PM David Blaikie wrote: > > > > On Wed, Apr 16, 2025 at 8:59 AM Kyle Huey via Dwarf-discuss > wrote: >> >> This may be more of an implementation question than a spec question, >> but this seems like the place to have the discussio

Re: [Dwarf-discuss] Representing captured `this` in C++ lambdas

2025-04-16 Thread Kyle Huey via Dwarf-discuss
ance. This looks like a good start to a proposal—Kyle, would > you like to write one? (See https://dwarfstd.org/comment.html.) > > -cary > > > On Wed, Apr 16, 2025 at 2:11 PM David Blaikie via Dwarf-discuss > wrote: >> >> >> >> On Wed, Apr 16, 20

[Dwarf-discuss] Representing captured `this` in C++ lambdas

2025-04-16 Thread Kyle Huey via Dwarf-discuss
This may be more of an implementation question than a spec question, but this seems like the place to have the discussion regardless. C++ debuggers that support expression evaluation need to identify the `this` pointer argument of member functions because C++ permits unqualified access to member v

Re: [Dwarf-discuss] Coroutines

2024-10-09 Thread Kyle Huey via Dwarf-discuss
Hi Felipe, Any chance you could point me in the right direction? - Kyle On Tue, Oct 1, 2024 at 9:41 AM Adrian Prantl wrote: > > CC'ing Felipe, who is currently reworking a lot of this code and is much > deeper in the subject matter than me. > > -- adrian > > > On Oct 1, 2024, at 8:42 AM, Kyle

Re: [Dwarf-discuss] Coroutines

2024-10-01 Thread Kyle Huey via Dwarf-discuss
On Wed, Feb 28, 2024 at 10:02 AM Adrian Prantl wrote: > LLDB implements this in a custom stepping plan that creates a conditional > breakpoint where two async contexts are compared: First, there's the active > async context at the time of the step. Next, the active async context at the > time t

Re: [Dwarf-discuss] Coroutines

2024-02-28 Thread Kyle Huey via Dwarf-discuss
On Wed, Feb 28, 2024 at 10:02 AM Adrian Prantl wrote: > > > > On Feb 27, 2024, at 1:53 PM, Kyle Huey via Dwarf-discuss > wrote: > > Put another way (forgive my pseudo code), if you have > > function silly_print() { > delay = rand(); > // Point

Re: [Dwarf-discuss] Location expressions for partially-optimized-out structs

2024-02-28 Thread Kyle Huey via Dwarf-discuss
On Tue, Feb 27, 2024 at 9:35 PM Cary Coutant wrote: > > > The text for DW_OP_bit_piece, on the other hand, does explicitly > > contemplate this, containing the language: > > > > If the location description is empty, the offset doesn’t matter and > > the DW_OP_bit_piece operation describes a piece

Re: [Dwarf-discuss] Location expressions for partially-optimized-out structs

2024-02-27 Thread Kyle Huey via Dwarf-discuss
On Tue, Feb 27, 2024 at 9:35 PM Cary Coutant wrote: > > > The text for DW_OP_bit_piece, on the other hand, does explicitly > > contemplate this, containing the language: > > > > If the location description is empty, the offset doesn’t matter and > > the DW_OP_bit_piece operation describes a piece

[Dwarf-discuss] Location expressions for partially-optimized-out structs

2024-02-27 Thread Kyle Huey via Dwarf-discuss
This originates from https://github.com/rust-lang/rust/issues/46698 This Rust program has a function that takes a struct type as an argument. The compiler is clever enough to rewrite the function so that a subset of the struct's fields are passed as arguments at the machine code level (in this cas

Re: [Dwarf-discuss] Coroutines

2024-02-27 Thread Kyle Huey via Dwarf-discuss
o you handle pointer reuse on async_contexts? > > > If I'm understanding the question correctly: there is a heap async_context > object for every continuation that is on the schedule at any time. I don't > think we can prevent a later continuation to be allocated in the same

Re: [Dwarf-discuss] Coroutines

2024-02-27 Thread Kyle Huey via Dwarf-discuss
nc_context. And the logic to understand what the async_context is and where it's found at function entry points is hardcoded into the Swift plugin? How do you handle pointer reuse on async_contexts? - Kyle > -- adrian > > > > > > > On Feb 20, 2024, at 11:47 AM, Kyle

[Dwarf-discuss] Coroutines

2024-02-20 Thread Kyle Huey via Dwarf-discuss
Has anyone proposed or discussed DWARF structures to represent coroutines or similar constructs? I skimmed the open issues list and didn't see anything relevant. - Kyle -- Dwarf-discuss mailing list Dwarf-discuss@lists.dwarfstd.org https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss

Re: [Dwarf-discuss] Facing a issue in contents of dwarf debug info section in an ELF file

2023-09-25 Thread Kyle Huey via Dwarf-discuss
Most likely the .debug_info section is SHF_COMPRESSED. Try compiling with -gz=none. - Kyle On Mon, Sep 25, 2023, 1:36 PM Rishi Raj via Dwarf-discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > > > I am trying to implement a dwarf parser in C++

Re: [Dwarf-discuss] Proposal: Error: DW_OP_entry_value description and examples

2023-08-08 Thread Kyle Huey via Dwarf-discuss
On Tue, Aug 8, 2023 at 9:22 AM Metzger, Markus T via Dwarf-discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > >### Section 2.5.1.7 Special Operations, p.37 > > > >The first sentence of the description of DW_OP_entry_value reads: > > > >The DW_OP_entry_value operation pushes the value that th

Re: [Dwarf-discuss] performance tools and inverted location lists

2023-06-16 Thread Kyle Huey via Dwarf-discuss
On Fri, Jun 16, 2023 at 8:28 AM Ben Woodard via Dwarf-discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > I was looking at 2 level location tables > https://dwarfstd.org/issues/140906.1.html and can see how it could > improve things there. One thing that I noticed about it was that it was > based

Re: [Dwarf-discuss] ISSUE: CPU vector types.

2023-04-04 Thread Kyle Huey via Dwarf-discuss
On Tue, Apr 4, 2023 at 3:09 AM Pedro Alves wrote: > This is introducing the need for the attribute. The audience is the > committee, not DWARF spec readers, > because none of this text would end up in the spec. It is just setting > the ground. > Ah, ok, never mind then. - Kyle -- Dwarf-discu

Re: [Dwarf-discuss] ISSUE: CPU vector types.

2023-04-03 Thread Kyle Huey via Dwarf-discuss
On Mon, Apr 3, 2023 at 12:42 PM Pedro Alves via Dwarf-discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > Hi Ben, > > On 2023-03-24 6:19 p.m., Ben Woodard via Dwarf-discuss wrote: > > > I will admit that in its current state it is a work in progress. My > original intent was to simply > > codify

Re: [Dwarf-discuss] ISSUE: CPU vector types.

2023-03-28 Thread Kyle Huey via Dwarf-discuss
On Tue, Mar 28, 2023 at 1:17 PM David Blaikie wrote: > > DW_AT[_GNU]_vector is best understood not as "a hardware vector > register" but rather as a marker that "this type is eligible to be passed > in hardware vector registers at function boundaries according to the > platform ABI". > > My 2c wo

Re: [Dwarf-discuss] ISSUE: CPU vector types.

2023-03-28 Thread Kyle Huey via Dwarf-discuss
On Mon, Mar 27, 2023 at 11:52 PM Cary Coutant via Dwarf-discuss < dwarf-discuss@lists.dwarfstd.org> wrote: > > Vector registers > > > > It has been the long standing existing practice to treat hardware > > vector registers as arrays of a fundamental base type. To deliniate > > these hardware regis