mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-25 20:57:17 +01:00
Do not consider ansi/wide/unicode strings as taggable for stabs
git-svn-id: trunk@27637 -
This commit is contained in:
parent
aa3f450832
commit
0d3bccaa1b
@ -76,6 +76,7 @@ interface
|
|||||||
global_stab_number : word;
|
global_stab_number : word;
|
||||||
vardatadef: trecorddef;
|
vardatadef: trecorddef;
|
||||||
tagtypeprefix: ansistring;
|
tagtypeprefix: ansistring;
|
||||||
|
function use_tag_prefix(def : tdef) : boolean;
|
||||||
{ tsym writing }
|
{ tsym writing }
|
||||||
function sym_var_value(const s:string;arg:pointer):string;
|
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;
|
function sym_stabstr_evaluate(sym:tsym;const s:string;const vars:array of string):ansistring;
|
||||||
@ -551,6 +552,16 @@ implementation
|
|||||||
appenddef(TAsmList(arg),tfieldvarsym(p).vardef);
|
appenddef(TAsmList(arg),tfieldvarsym(p).vardef);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TDebugInfoStabs.use_tag_prefix(def : tdef) : boolean;
|
||||||
|
begin
|
||||||
|
{ stringdefs are not all considered as 'taggable',
|
||||||
|
because ansi, unicode and wide strings are
|
||||||
|
just associated to pointer types }
|
||||||
|
use_tag_prefix:=(def.typ in tagtypes) and
|
||||||
|
((def.typ<>stringdef) or
|
||||||
|
(tstringdef(tdef).stringtype in [st_shortstring,st_longstring]));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TDebugInfoStabs.write_def_stabstr(list:TAsmList;def:tdef;const ss:ansistring);
|
procedure TDebugInfoStabs.write_def_stabstr(list:TAsmList;def:tdef;const ss:ansistring);
|
||||||
var
|
var
|
||||||
@ -559,7 +570,7 @@ implementation
|
|||||||
st : ansistring;
|
st : ansistring;
|
||||||
begin
|
begin
|
||||||
{ type prefix }
|
{ type prefix }
|
||||||
if def.typ in tagtypes then
|
if use_tag_prefix(def) then
|
||||||
stabchar := tagtypeprefix
|
stabchar := tagtypeprefix
|
||||||
else
|
else
|
||||||
stabchar := 't';
|
stabchar := 't';
|
||||||
|
|||||||
@ -132,7 +132,7 @@ implementation
|
|||||||
st : ansistring;
|
st : ansistring;
|
||||||
begin
|
begin
|
||||||
{ type prefix }
|
{ type prefix }
|
||||||
if def.typ in tagtypes then
|
if use_tag_prefix(def) then
|
||||||
stabchar := tagtypeprefix
|
stabchar := tagtypeprefix
|
||||||
else
|
else
|
||||||
stabchar := 't';
|
stabchar := 't';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user