Forum > General
how to debug RTL routines in lazarus?
alexraynepe196:
Hallow.
have instaled lazarus 2.2.5 on win10.
my lazarus application crashes invoking setlength( soe_dinamic_array, len ) - rises exception access violation on $ffffffffffffffffffff adreess.
debuger cant traverse into it - looks have no debug info.
how to prepare RTL for debug in lazarus?
Martin_fr:
To debug the RTL, you will need to build FPC from sources. But I don't think you need to debug the RTL.
Does the stack window (menu View > Debug Windows > Stack) show the calling code?
If yes, select the calling code as "current" and check the value of the string/array passed to setlength. More important, check the "hidden pointer" of the string/array => add a watch "Pointer(my_array_var)"
Very likely this variable contains trash.
If you do not see entries in the stack window, go to Tools > Options > Debugger Backend
and change between FpDebug and GDB, and then try again.
(When done, change to FpDebug, which should be used by default)
alexraynepe196:
> Does the stack window (menu View > Debug Windows > Stack) show the calling code?
i see calling code - and it is assembler. and no any sources attached on it
I wanna debug an RTL sources on my problem dynamic array
alexraynepe196:
--- Quote --- If yes, select the calling code as "current" and check the value of the string/array passed to setlength. More important, check the "hidden pointer" of the string/array => add a watch "Pointer(my_array_var)"
Very likely this variable contains trash.
--- End quote ---
i have Nil pointer, and setlength(var, 168) with it rises exception
alexraynepe196:
i overwrited memory by some prevous dinamic-array operation. and looks that corrupted heap-memory allocator structures
Navigation
[0] Message Index
[#] Next page