Recent

Author Topic: Obtaining global unit method names from pointers  (Read 1390 times)

JernejL

  • Jr. Member
  • **
  • Posts: 92
Obtaining global unit method names from pointers
« on: July 03, 2018, 08:39:39 am »
Code: Pascal  [Select][+][-]
  1.     showmessage(BackTraceStrFunc(@registerguipointer));
  2.  
  3.     GetLineInfo(longword(@registerguipointer), tfunc, tsource, iline);
  4.  
  5.     showmessage(tsource);
  6.  

Neither will return actual function name in that pointer.
 
Quote
$00439B00 line 278 of game_Gui.pas

with GetLineInfo:

tfunc = ''
tsource = 'game_gui.pas'
 
I'm running this on lazarus 1.8.0 rc5 and fpc 3.0.4. debug symbols are dwarf2 with nearly all debug data options on, i've gone thru all the documentation on http://wiki.freepascal.org/Logging_exceptions and can't find a way to get unit procedure names from pointer, what else is availible?
 

 

TinyPortal © 2005-2018