[fpc-devel] Status of debug line info
relfos at gmail.com
Tue Jun 23 15:22:14 CEST 2015
I was trying to get lineinfo to work in the crash reporter since I've seen
some comercial games doing the same (reporting a stack dump with
The problem with gathering just addresses is that they change with every
build (and I ship daily builds).
Anyway I could try that, but I still need the base address, and I have
clue how to obtain that in FPC.
Is there any easy way to find it?
Probably reading it from /proc/pid/maps in unix platforms could work...
Another question, I thought about a idea for platform independent way to
support line info.
Could the compiler generate a internal table/array that mapped all
functions addresses to strings?
Let's say a additional-Gsomething flag is added for this, then a
internal function would be generated, and called at run-time, before
initialization. The function would just build a huge table of adress
associations, like this.
register_debug_address(@unitX_funcA, 'unitX', 'funcA');
register_debug_address(@unitX_funcB, 'unitX', 'funcB');
register_debug_address(@unitY_funcA, 'unitY', 'funcA');
// all other functions/methods/procedures in the whole program ...
Probably not as simple of that, it might need more info (range of the
functions address, not just starting point).
Then calling BackTraceStrFunc() would look up the address using the
Even though this would just be useful to print routine names and not
would this work?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel