Add some debug-symbols to any file with deug-info (gs/gw)
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
In order to allow easier debugging, and also in order to allow an IDe to evaluate certain expressions to access memory, it would be nice if some symbols would always be present, even if not used by the application.
That is present, as soon as any debug info is added.
- the type "Exception"
Currently it is hard (or sometimes impossible) for an user (or IDE) to get any information about an exception, if it has occurred.
Not that symbols like FPC_RAISEEXCEPTION, FPC_BREAK_ERROR or FPC_RUNERROR are already always added. Allowing to set a breakpoint.
Including Exception will probably also pull TObject, which currently is not always in the debug info neither.
-data-evaluate-expression Exception(&LtPos;addr>).FMessage
should then return a meaningful value
&LtPos;addr> may be eax, or an other register for non intel32
- Allow a way to access the ClassName of an object
ClassName is a property with getter method, so currently unavailable to be called.
But even if it was call-able, it may be preferable to access the ClassName without calling a method.
This could be done by including the TVmt record in the debug info. Then
-data-evaluate-expression ^TVmt(object)^.vClassName
or
-data-evaluate-expression PVmt(object)^.vClassName
should work
- basic types and constants
"nil" is currently never present. It may be nich to include nil as a constant
"pointer" may not always be present, it probably always should be included
other types may be char, boolean, longint
(char has currently a hardcoded fallback in gdb, it apears. But no gurante
that stays)
Mantis conversion info:
- Mantis ID: 18510
- OS: win
- OS Build: vista
- Platform: w32
- Version: 2.5.1
- Monitored by: » @PascalDragon (Sven Barth)