mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 12:48:17 +02:00
Debugger: Inspect-Dialog more info for methods.
This commit is contained in:
parent
f14afcf1a4
commit
ee82f625c3
@ -223,7 +223,8 @@ resourcestring
|
||||
lisColClass = 'Class';
|
||||
lisColVisibility = 'Visibility';
|
||||
lisColReturns = 'Returns';
|
||||
lisColAddress = 'Address';
|
||||
lisColAddress = 'Function Address';
|
||||
lisColInstance = 'Object Instance';
|
||||
|
||||
// Breakpoint
|
||||
lisHitCount = 'Hitcount';
|
||||
|
@ -8,6 +8,7 @@ uses
|
||||
Classes, SysUtils, IdeDebuggerWatchResult, LazDebuggerIntf;
|
||||
|
||||
function ExtractProcResFromMethod(AMethodRes: TWatchResultData): TWatchResultData;
|
||||
function ExtractInstanceResFromMethod(AMethodRes: TWatchResultData): TWatchResultData;
|
||||
|
||||
implementation
|
||||
|
||||
@ -28,5 +29,22 @@ begin
|
||||
Result := AMethodRes.Fields[0].Field;
|
||||
end;
|
||||
|
||||
function ExtractInstanceResFromMethod(AMethodRes: TWatchResultData
|
||||
): TWatchResultData;
|
||||
begin
|
||||
Result := nil;
|
||||
if (AMethodRes <> nil) and
|
||||
(AMethodRes.StructType = dstRecord) and
|
||||
(AMethodRes.FieldCount = 2) and
|
||||
(LowerCase(AMethodRes.Fields[0].FieldName) = 'proc') and
|
||||
(AMethodRes.Fields[0].Field <> nil) and
|
||||
(AMethodRes.Fields[0].Field.ValueKind in [rdkFunction, rdkProcedure, rdkFunctionRef, rdkProcedureRef]) and
|
||||
(LowerCase(AMethodRes.Fields[1].FieldName) = 'self') and
|
||||
(AMethodRes.Fields[1].Field <> nil) and
|
||||
(AMethodRes.Fields[1].Field.ValueKind = rdkStruct)
|
||||
then
|
||||
Result := AMethodRes.Fields[1].Field;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -409,7 +409,7 @@ const
|
||||
end;
|
||||
|
||||
var
|
||||
Res, Fld, Fld2: TWatchResultData;
|
||||
Res, Fld, Fld1, Fld2: TWatchResultData;
|
||||
FldCnt, MethCnt, f, m: Integer;
|
||||
FldInfo: TWatchResultDataFieldInfo;
|
||||
AnchType, s: String;
|
||||
@ -446,6 +446,7 @@ begin
|
||||
for FldInfo in res do begin
|
||||
Fld := FldInfo.Field;
|
||||
Fld := Fld.ConvertedRes;
|
||||
Fld1 := ExtractInstanceResFromMethod(Fld);
|
||||
Fld2 := ExtractProcResFromMethod(Fld);
|
||||
|
||||
if (MethCnt > 0) and
|
||||
@ -476,8 +477,25 @@ begin
|
||||
|
||||
if Fld2 = nil then Fld2 := Fld;
|
||||
if Fld2 <> nil
|
||||
then FGridMethods.Cells[3,m] := IntToHex(Fld2.AsQWord, 16)
|
||||
else FGridMethods.Cells[3,m] := '';
|
||||
then begin
|
||||
if Fld2.AsQWord = 0 then
|
||||
FGridMethods.Cells[3,m] := 'nil'
|
||||
else
|
||||
FGridMethods.Cells[3,m] := IntToHex(Fld2.AsQWord, 16);
|
||||
end
|
||||
else
|
||||
FGridMethods.Cells[3,m] := '';
|
||||
|
||||
FGridMethods.Cells[4,m] := '';
|
||||
if Fld1 <> nil then begin
|
||||
if Fld1.DataAddress = 0 then
|
||||
FGridMethods.Cells[4,m] := 'nil'
|
||||
else
|
||||
if Fld1.DataAddress = Res.DataAddress then
|
||||
FGridMethods.Cells[4,m] := 'self'
|
||||
else
|
||||
FGridMethods.Cells[4,m] := IntToHex(Fld1.DataAddress, 16);
|
||||
end;
|
||||
|
||||
inc(m);
|
||||
end
|
||||
@ -1029,11 +1047,12 @@ begin
|
||||
RowCount:=2;
|
||||
FixedRows:=1;
|
||||
FixedCols:=0;
|
||||
ColCount:=4;
|
||||
ColCount:=5;
|
||||
Cols[0].Text:=lisName;
|
||||
Cols[1].Text:=dlgEnvType;
|
||||
Cols[2].Text:=lisColReturns;
|
||||
Cols[3].Text:=lisColAddress;
|
||||
Cols[4].Text:=lisColInstance;
|
||||
Color:=clBtnFace;
|
||||
end;
|
||||
FGridMethods.RowCount:=1;
|
||||
|
@ -483,13 +483,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -484,13 +484,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -490,13 +490,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -509,13 +509,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adresa"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Třída"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Odřádkování"
|
||||
|
@ -507,13 +507,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Klasse"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -513,13 +513,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Dirección"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Clase"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Retorna"
|
||||
|
@ -505,13 +505,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Osoite"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Luokka"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Palauttaa"
|
||||
|
@ -510,13 +510,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adresse"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Classe"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Retourne"
|
||||
|
@ -507,13 +507,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -509,13 +509,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Cím"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Osztály"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Eredmény típusa"
|
||||
|
@ -492,13 +492,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -513,13 +513,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Indirizzo"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Classe"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Ritorna"
|
||||
|
@ -511,13 +511,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "アドレス"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "クラス"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "リターン"
|
||||
|
@ -511,13 +511,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adresas"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Klasė"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Grąžina"
|
||||
|
@ -492,13 +492,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -509,13 +509,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adres"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Klasa"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Zwraca"
|
||||
|
@ -491,13 +491,17 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -511,13 +511,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Endereço"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Classe"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Retorna"
|
||||
|
@ -503,13 +503,19 @@ msgid "Clear"
|
||||
msgstr "Очистить"
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Адрес"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Класс"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Тип результата"
|
||||
|
@ -506,13 +506,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adresa"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
@ -496,13 +496,19 @@ msgid "Clear"
|
||||
msgstr "Temizle"
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Adres"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Sınıf"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Dönüş"
|
||||
|
@ -510,13 +510,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "Адреса"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "Клас"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "Повертає"
|
||||
|
@ -510,13 +510,19 @@ msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscoladdress
|
||||
msgid "Address"
|
||||
#, fuzzy
|
||||
#| msgid "Address"
|
||||
msgid "Function Address"
|
||||
msgstr "地址"
|
||||
|
||||
#: idedebuggerstringconstants.liscolclass
|
||||
msgid "Class"
|
||||
msgstr "类"
|
||||
|
||||
#: idedebuggerstringconstants.liscolinstance
|
||||
msgid "Object Instance"
|
||||
msgstr ""
|
||||
|
||||
#: idedebuggerstringconstants.liscolreturns
|
||||
msgid "Returns"
|
||||
msgstr "返回(Returns)"
|
||||
|
Loading…
Reference in New Issue
Block a user