compiler: generate STABS debug info for Variant type

git-svn-id: trunk@14326 -
This commit is contained in:
paul 2009-12-04 17:06:17 +00:00
parent 4e29be8a36
commit ae52b19820

View File

@ -60,6 +60,7 @@ interface
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 @@ implementation
tagtypes = [
recorddef,
variantdef,
enumdef,
stringdef,
filedef,
@ -784,7 +786,9 @@ implementation
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,8 @@ implementation
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;