diff --git a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas index fa96c75581..08babf2069 100644 --- a/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas +++ b/components/lazdebuggers/lazdebuggerfp/test/testwatches.pas @@ -629,6 +629,9 @@ procedure TTestWatches.TestWatchesValue; //t.Add(p+'Comp_2'+e, weFloat(-150.125+n, 'Comp' )); t.Add(AName, p+'Currency_2'+e, weFloat(-125.123+n, 'Currency' ))^.AddFlag([ehNotImplementedData]); + t.Add(AName, p+'Ptr1'+e, wePointerAddr(nil, 'Pointer')); + t.Add(AName, p+'Ptr2'+e, wePointerAddr(Pointer(1000+n), 'Pointer')); + t.Add(AName, p+'Char'+e, weChar(AChr1)); t.Add(AName, p+'Char2'+e, weChar(#0)); t.Add(AName, p+'Char3'+e, weChar(' ')); @@ -950,7 +953,10 @@ begin t.Add('@SomeFunc1', weMatch('^\^function.*\(\$[0-9A-F]+\)'{' = SomeFunc1'}, skPointer {skFunctionRef}) ); t.Add('@SomeProc1', weMatch('^\^procedure.*\(\$[0-9A-F]+\)'{' = SomeFunc1'}, skPointer {skProcedureRef}) ); + // TODO: TClass1 must not contain "" + // ' _vptr$TOBJECT: Pointer' t.Add( 'TClass1', weMatch('type class\(TObject\).*FInt: (integer|longint).*end', skType)).AddFlag(ehNoTypeInfo); + t.Add( 'TClass1', weMatch('type class\(TObject\).*_vptr\$TOBJECT: *Pointer.*end', skType)).AddFlag(ehNoTypeInfo); t.Add( 'TFunc1', weMatch('type function *\(SomeValue.*\) *: *Boolean', skType)).AddFlag(ehNoTypeInfo); t.Add( 'TIntStatArray', weMatch('type array *\[1\.\.5\] *of (integer|longint)', skType)).AddFlag(ehNoTypeInfo); t.Add( 'TIntDynArray', weMatch('type array of (integer|longint)', skType)).AddFlag(ehNoTypeInfo); diff --git a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc index 516785ab0b..3a9f591c9f 100644 --- a/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc +++ b/components/lazdebuggers/lazdebugtestbase/testapps/WatchesValuePrgIdent.inc @@ -42,6 +42,9 @@ //pre__Comp_2{e} _OP_ Comp (-150.125 + ADD); //@@ //_pre3_Comp_2; pre__Currency_2{e} _OP_ Currency (-125.123 + ADD); //@@ _pre3_Currency_2; + pre__Ptr1{e} _OP_ Pointer (0 ); //@@ _pre3_Ptr1; + pre__Ptr2{e} _OP_ Pointer (1000 + ADD); //@@ _pre3_Ptr2; + // **** Char and String types **** pre__Char{e} _OP_ char (CHR1 ); //@@ _pre3_Char; diff --git a/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas b/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas index 87de91263b..62e40b5582 100644 --- a/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas +++ b/components/lazdebuggers/lazdebugtestbase/ttestwatchutilities.pas @@ -1448,7 +1448,10 @@ begin Result := True; Expect := AContext.Expectation; - e := '\$0*'+IntToHex(PtrUInt(Expect.ExpPointerValue), 8); + if Expect.ExpPointerValue = nil then + e := 'nil' + else + e := '\$0*'+IntToHex(PtrUInt(Expect.ExpPointerValue), 8); if Expect.ExpTypeName <> '' then e := Expect.ExpTypeName+'\('+e+'\)'; e := '^'+e;