Re: [Dwarf-Discuss] Using DWARF for C++ runtime reflection

2018-03-06 Thread Michael Eager
On 03/06/2018 10:37 AM, Roman Popov wrote: Hi everyone, I'm working on a dynamic analysis tool that needs runtime reflection in C++. Since C++ has no standardized runtime reflection, I'm using DWARF as a source of reflection metadata. Is it a legitimate use-case from DWARF standard point of

Re: [Dwarf-Discuss] Using DWARF for C++ runtime reflection

2018-03-06 Thread Roman Popov
> > It is certainly an interesting use case. I haven't see this done before, > but since DWARF gives descriptions of classes, it seems reasonable. I've found some attempts in this direction on github. So certainly I'm not the first one. My application is hardware modeling, I make something

[Dwarf-Discuss] Using DWARF for C++ runtime reflection

2018-03-06 Thread Roman Popov
Hi everyone, I'm working on a dynamic analysis tool that needs runtime reflection in C++. Since C++ has no standardized runtime reflection, I'm using DWARF as a source of reflection metadata. Is it a legitimate use-case from DWARF standard point of view? It has been working great for me until

Re: [Dwarf-Discuss] Using DWARF for C++ runtime reflection

2018-03-06 Thread Michael Eager
Yes, assuming that the compiler generates a valid source type. In some cases, particularly with template classes, this may not be the case.  So DWARF does not give any guarantees and it's up to compiler vendor to decide about DW_AT_name? DWARF doesn't give

Re: [Dwarf-Discuss] Using DWARF for C++ runtime reflection

2018-03-06 Thread David Blaikie
On Tue, Mar 6, 2018 at 11:21 AM Roman Popov wrote: > It is certainly an interesting use case. I haven't see this done before, >> but since DWARF gives descriptions of classes, it seems reasonable. > > I've found some attempts in this direction on github. So certainly I'm not