[Lazarus] Viewing stack content
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Thu Aug 9 16:01:55 CEST 2012
Martin wrote:
> On 09/08/2012 14:09, Martin wrote:
>> On 09/08/2012 14:02, Mark Morgan Lloyd wrote:
>>> When debugging e.g. a cdecl call to a standard library, how can one
>>> inspect the top few words on the stack?
>>>
>>
>> Usually at least the top most frame is shown (though locals, and
>> params may not)
>> If further frames or some info is missing, then it usually means gdb
>> does not know how to read the stackframe.
>>
>> Not sure what can be done.
>>
> If you mean raw memory
>
> depends on cpu. Intel with esp, add a watch, set to memory dump:
> ^Byte($esp)[-20]
>
> starts 20 bytes before esp
Thanks, I think that'll do. I'm trying to sort out a shared library
call- the interface to the library is working properly but I suspect a
higher-level shim is confusing a pointer and a value somewhere.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list