* don't create debugging entries for generic typesyms, since they

refer to typedefs which aren't written out either
  * fixed longstring debuginfo and fixed overflow/range errors with
    in creating it on 64 bit systems

git-svn-id: trunk@6821 -
This commit is contained in:
Jonas Maebe 2007-03-13 14:51:47 +00:00
parent f97d028e39
commit 95ef3145fc

View File

@ -1322,13 +1322,14 @@ implementation
procedure TDebugInfoDwarf.appenddef_string(def:tstringdef); procedure TDebugInfoDwarf.appenddef_string(def:tstringdef);
procedure addnormalstringdef(const name: shortstring; lendef: tdef; maxlen: cardinal); procedure addnormalstringdef(const name: shortstring; lendef: tdef; maxlen: aword);
var var
slen : aint; { maxlen can be > high(int64) }
slen : aword;
arr : tasmlabel; arr : tasmlabel;
begin begin
{ fix length of openshortstring } { fix length of openshortstring }
slen:=def.len; slen:=aword(def.len);
if slen=0 then if slen=0 then
slen:=maxlen; slen:=maxlen;
@ -1390,7 +1391,11 @@ implementation
end; end;
st_longstring: st_longstring:
begin begin
addnormalstringdef('LongString',u32inttype,$ffffffff); {$ifdef cpu64bit}
addnormalstringdef('LongString',u64inttype,qword(-1));
{$else cpu64bit}
addnormalstringdef('LongString',u32inttype,cardinal(-1));
{$endif cpu64bit}
end; end;
st_ansistring: st_ansistring:
begin begin
@ -1944,11 +1949,14 @@ implementation
end; end;
procedure TDebugInfoDwarf.appendsym_type(sym: ttypesym); procedure TDebugInfoDwarf.appendsym_type(sym: ttypesym);
begin
if not(df_generic in sym.typedef.defoptions) then
begin begin
append_entry(DW_TAG_typedef,false,[ append_entry(DW_TAG_typedef,false,[
DW_AT_name,DW_FORM_string,symname(sym)+#0 DW_AT_name,DW_FORM_string,symname(sym)+#0
]); ]);
append_labelentry_ref(DW_AT_type,def_dwarf_lab(sym.typedef)); append_labelentry_ref(DW_AT_type,def_dwarf_lab(sym.typedef));
end;
finish_entry; finish_entry;
(* Moved fom append sym, do we need this (MWE) (* Moved fom append sym, do we need this (MWE)