Domanda

I have a problem with a unit's finalization section causing a deadlock in my unloadDLL call. I have a suspicion which one it is, but I like a bit of confirmation.

The calling code is within system.pas.FinalizeUnits and looks like:

while Count > 0 do
begin
  Dec(Count);
  InitContext.InitCount := Count;
  P := Table^[Count].FInit;
  if Assigned(P) then
  begin
{$IFDEF LINUX}
    CallProc(P, InitContext.Module^.GOT);
{$ENDIF}
{$IFDEF MSWINDOWS}
    TProc(P)();
{$ENDIF}

where P is a pointer to the finalization routine of a unit.

When in debug mode I can evaluate/modify TProc(P) which gives me (no value), but if I then Inspect this it shows me the unit and procedure name in Debug Inspector.

Is there any way for me to get this output into a watch so I don't have to set up Debug Inspector each time or could I get this value as a string to make it output the routines it is about to execute to the Event Log?

If it matters I'm using the Windows version, not Kylix

È stato utile?

Soluzione

The debugger has the debug info at hand and can look up the function. However, to the very best of my knowledge, there's no ready way to get that same information into a watch.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top