[Overview][Procedures and functions][Index] Reference for unit 'lnfodwrf' (#rtl)

GetLineInfo

Return source line information about an address.

Declaration

Source position: lnfodwrf.pp line 28

function GetLineInfo(

  addr: ptruint;

  var func: String;

  var source: String;

  var line: LongInt

):Boolean;

Arguments

addr

  

Address to examine

func

  

Name of function in which Addr resides.

source

  

Source file in which Addr was implemented.

line

  

Line number on which Addr was implemented.

Function result

True if the line information was found, False if not.

Description

GetLineInfo returns source line information about the address addr. It searches this information in the DWARF debugging information found in the binary: If the file was compiled without debug information, nothing will be returned. Upon succesful retrieval of the debug information, True is returned, and the func parameter is filled with the name of the function in which the address is located. The source parameter contains the name of the file in which the function was implemented, and line contains the line number in the source file for addr.

Errors

If no debug information is found, False is returned.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.