mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 16:38:17 +02:00
Merged revision(s) 59655-59656 #895fe14aed-#895fe14aed, 59678-59680 #7716b8a149-#7716b8a149, 59692-59693 #84ba359bbd-#84ba359bbd from trunk:
LazDebuggerFp: handle "ignored exceptions" list ........ LazDebuggerFp: deal with fpc info for nested procs variable scopes. ........ LazDebugger(Fp)LLDB: fix, check for ignored exceptions ........ LazDebugger(Fp)LLDB: fix getting class-name for exceptions ........ LazDebugger(Fp)LLDB: fix memory leak ........ FpDebug: print type-name for structured types ........ Debugger: Fix wrong class for threads. ........ git-svn-id: branches/fixes_2_0@59705 -
This commit is contained in:
parent
70f729a84c
commit
fcc64fc072
@ -765,7 +765,7 @@ function TFpPascalPrettyPrinter.InternalPrintValue(out APrintedValue: String;
|
||||
end;
|
||||
end;
|
||||
if not Result then
|
||||
APrintedValue := '(' + APrintedValue + ')';
|
||||
APrintedValue := ResTypeName + ' (' + APrintedValue + ')';
|
||||
Result := True;
|
||||
finally
|
||||
if Cache <> nil then
|
||||
|
@ -21,7 +21,7 @@ uses
|
||||
DbgIntfDebuggerBase,
|
||||
FpdMemoryTools,
|
||||
FpPascalParser,
|
||||
FPDbgController, FpDbgDwarfDataClasses;
|
||||
FPDbgController, FpDbgDwarfDataClasses, FpDbgDwarfFreePascal;
|
||||
|
||||
type
|
||||
|
||||
@ -1591,6 +1591,7 @@ var
|
||||
ExceptionClass: string;
|
||||
ExceptionMessage: string;
|
||||
RegDxDwarfIndex: byte;
|
||||
ExceptItem: TBaseException;
|
||||
begin
|
||||
// Using regvar:
|
||||
// In all their wisdom, people decided to give the (r)dx register dwarf index
|
||||
@ -1609,6 +1610,14 @@ begin
|
||||
ExceptionMessage := ReadAnsiString(AnExceptionObjectLocation+DBGPTRSIZE[FDbgController.CurrentProcess.Mode]);
|
||||
end;
|
||||
|
||||
ExceptItem := Exceptions.Find(ExceptionClass);
|
||||
if (ExceptItem <> nil) and (ExceptItem.Enabled)
|
||||
then begin
|
||||
continue := True;
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
DoException(deInternal, ExceptionClass, AnExceptionLocation, ExceptionMessage, continue);
|
||||
end;
|
||||
|
||||
|
@ -682,11 +682,13 @@ var
|
||||
i: SizeInt;
|
||||
begin
|
||||
// (char * ) $2 = 0x005c18d0 "\tException"
|
||||
// (char *) $10 = 0x00652d44 "\x04TXXX"
|
||||
s := TLldbInstructionReadExpression(Sender).Res;
|
||||
i := pos('"', s);
|
||||
if i > 0 then begin
|
||||
if s[i+1] = '\' then inc(i);
|
||||
s := copy(s, i+2, Length(s)-i-2);
|
||||
if s[i+1] = '\' then inc(i, 2);
|
||||
if s[i] = 'x' then inc(i, 2);
|
||||
s := copy(s, i+1, Length(s)-i-1);
|
||||
end;
|
||||
FCurrentExceptionInfo.FExceptClass := s;
|
||||
Include(FCurrentExceptionInfo.FHasCommandData, exiClass);
|
||||
@ -764,6 +766,7 @@ const
|
||||
ExcClass, ExcMsg: String;
|
||||
CanContinue: Boolean;
|
||||
Instr: TLldbInstructionStackTrace;
|
||||
ExceptItem: TBaseException;
|
||||
begin
|
||||
if exiClass in FCurrentExceptionInfo.FHasCommandData then
|
||||
ExcClass := FCurrentExceptionInfo.FExceptClass
|
||||
@ -774,6 +777,14 @@ const
|
||||
else
|
||||
ExcMsg := '<Unknown Message>'; // TODO: move to IDE
|
||||
|
||||
ExceptItem := Debugger.Exceptions.Find(ExcClass);
|
||||
if (ExceptItem <> nil) and (ExceptItem.Enabled)
|
||||
then begin
|
||||
FState := crStoppedRaise;
|
||||
ContinueRunning;
|
||||
exit;
|
||||
end;
|
||||
|
||||
CanContinue := Debugger.DoExceptionHit(ExcClass, ExcMsg);
|
||||
|
||||
if CanContinue then begin
|
||||
@ -1047,7 +1058,10 @@ procedure TLldbDebuggerCommandRun.ResetStateToRun;
|
||||
begin
|
||||
FState := crRunning;
|
||||
FCurBrkId := 0;
|
||||
FThreadInstr := nil;
|
||||
if FThreadInstr <> nil then begin
|
||||
FThreadInstr.ReleaseReference;
|
||||
FThreadInstr := nil;
|
||||
end;
|
||||
FCurrentExceptionInfo.FHasCommandData := [];
|
||||
end;
|
||||
|
||||
|
@ -1348,6 +1348,9 @@ type
|
||||
FThread: TIdeThreadEntry;
|
||||
protected
|
||||
function GetUnitInfoProvider: TDebuggerUnitInfoProvider; override;
|
||||
public
|
||||
function CreateCopy: TCallStackEntry; override;
|
||||
procedure Assign(AnOther: TCallStackEntry); override;
|
||||
end;
|
||||
|
||||
{ TThreadEntry }
|
||||
@ -1846,6 +1849,20 @@ begin
|
||||
Result := FThread.GetUnitInfoProvider;
|
||||
end;
|
||||
|
||||
function TIdeThreadFrameEntry.CreateCopy: TCallStackEntry;
|
||||
begin
|
||||
Result := TIdeThreadFrameEntry.Create;
|
||||
Result.Assign(Self);
|
||||
end;
|
||||
|
||||
procedure TIdeThreadFrameEntry.Assign(AnOther: TCallStackEntry);
|
||||
begin
|
||||
inherited Assign(AnOther);
|
||||
if AnOther is TIdeThreadFrameEntry then begin
|
||||
FThread := TIdeThreadFrameEntry(AnOther).FThread;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TIDEBreakPointGroupList }
|
||||
|
||||
function TIDEBreakPointGroupList.GetItem(AIndex: Integer): TIDEBreakPointGroup;
|
||||
|
Loading…
Reference in New Issue
Block a user