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

2025-05-07 Thread Todd Allen via Dwarf-discuss
I think that's orthogonal to the point, which was that a rnglist is meant to describe a pc range, not a data range. BTW, I don't think you need to create the vtable on the fly in that case.  The Pkg.Print function will need a static link, but the vtable doesn't need to encode that.  I just chec

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

2025-05-07 Thread Todd Allen via Dwarf-discuss
BTW, I don't think you need to create the vtable on the fly in that case. The Pkg.Print function will need a static link, but the vtable doesn't need to encode that. I just checked our Ada compiler. We stopped development on this compiler after Ada 95, but the only change I had to make to your e

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

2025-05-07 Thread Todd Allen via Dwarf-discuss
In 250506.2, the use of a rnglist is throwing me. I would expect the lifetime of a vtable to be the whole program. Or did you envision the rnglist to be the range of data/rodata addresses of the vtable object? 2.17 clarifies that they're code addresses (i.e. text), though. We did have a disc

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

2025-05-07 Thread Ben Woodard via Dwarf-discuss
Can unions have virtual functions and thus vtables? My understanding is that unions can have member functions but I can't see how they can have virtual functions? What function would you call? Where would you put the vtable pointer? This article on C++ reference suggests that they cannot have

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

2025-05-07 Thread Pierre-Marie de Rodat via Dwarf-discuss
Hello, On Wed, May 7, 2025 at 2:49 PM Todd Allen via Dwarf-discuss wrote: > In 250506.2, the use of a rnglist is throwing me. I would expect the > lifetime of a vtable to be the whole program. Or did you envision the > rnglist to be the range of data/rodata addresses of the vtable object? 2.

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

2025-05-07 Thread Pierre-Marie de Rodat via Dwarf-discuss
On Wed, May 7, 2025 at 4:11 PM Todd Allen wrote: > I think that's orthogonal to the point, which was that a rnglist is > meant to describe a pc range, not a data range. Got it; I did not get this was your point, I was mainly reacting to the part of your message “I would expect the lifetime of a v

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

2025-05-07 Thread Cary Coutant via Dwarf-discuss
> > In 250506.2, the use of a rnglist is throwing me. I would expect the > lifetime of a vtable to be the whole program. Or did you envision the > rnglist to be the range of data/rodata addresses of the vtable object? > 2.17 clarifies that they're code addresses (i.e. text), though. > The DW_AT_