Jonas Maebe wrote:
That's because I did not change anything to Stabs. Stabs is old and
legacy (not deprecated, but not actively developed anymore either). If
someone else wants to fix it in Stabs, be my guest.
Can I be your guest?
The patch do the job. Althought it writes VARIANT to the debug info. But
in Lazarus there is no problem to check for both 'Variant' and
'VARIANT'. If you apply it (or allow me to apply it) then I will fix
lazarus too.
Best regards,
Paul Ishenin.
Index: dbgstabs.pas
===================================================================
--- dbgstabs.pas (revision 14321)
+++ dbgstabs.pas (working copy)
@@ -60,6 +60,7 @@
writing_def_stabs : boolean;
global_stab_number : word;
defnumberlist : TFPObjectList;
+ vardatadef: trecorddef;
{ tsym writing }
function sym_var_value(const s:string;arg:pointer):string;
function sym_stabstr_evaluate(sym:tsym;const s:string;const
vars:array of string):ansistring;
@@ -138,6 +139,7 @@
tagtypes = [
recorddef,
+ variantdef,
enumdef,
stringdef,
filedef,
@@ -784,7 +786,9 @@
var
ss : ansistring;
begin
- ss:=def_stabstr_evaluate(def,'${numberstring};',[]);
+ ss:='s'+tostr(vardatadef.size);
+ vardatadef.symtable.SymList.ForEachCall(@field_add_stabstr,@ss);
+ ss[length(ss)]:=';';
write_def_stabstr(list,def,ss);
end;
@@ -1487,6 +1491,9 @@
stabsvarlist:=TAsmList.create;
stabstypelist:=TAsmList.create;
+ vardatadef:=trecorddef(search_system_type('TVARDATA').typedef);
+
+
{ include symbol that will be referenced from the main to be sure to
include this debuginfo .o file }
current_module.flags:=current_module.flags or uf_has_stabs_debuginfo;
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel