Adding properties into existing stabs/dwarf; gdb readable workaround ? [[Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]]

Martin lazarus at mfriebe.de
Mon Sep 12 20:08:34 CEST 2011


On 12/09/2011 18:32, Jonas Maebe wrote:
> On 12 Sep 2011, at 14:07, Martin wrote:
>
>> Anyone care to comment on those ideas?
>>
>> Are they worth to be made a feature request?
>> And if so, which of the proposed ideas should be made into a feature request?
> I really don't like hacks like that. They will have to be maintained almost forever because tools will rely on them, just like the previously mentioned hack for shortstrings (they're also represented using a fake record).
>
> While not a complete solution either, couldn't you use the information from the Lazarus codetools to figure out which properties exist? If that's currently not possible because you don't know which unit the type is declared in: DWARF supports adding information about where an entity is declared to the debug information. While FPC currently does not do that, this is something that could be added if it would help you.

Using codetools is currently in discussion. There is someone who might 
contribute towards that.

If it is done, it will be used anyway, since it will not have to wait 
for another fpc release. But I don't think it is the preferable 
solution, if symbols could somehow be provided by debug info means. 
(even, i they would require an extra switch at compile time / though 
from your comment that doesn't change the issue).

Adding declared-in-unit info: not sure if it will help much. afaik 
codetools has no problem finding that. Also it would rely on gdb being 
able to return this info.  And currently all is done through gdb.

I do plan in future to read dwarf directly, that will solve other 
issues. But of course it can again only provide info that is present....





More information about the fpc-devel mailing list