mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
* Escape newlines in constant string stabs
This commit is contained in:
parent
0750bd97e5
commit
ca593dede2
@ -620,9 +620,16 @@ uses
|
|||||||
backspace_quote:='';
|
backspace_quote:='';
|
||||||
for i:=1 to length(s) do
|
for i:=1 to length(s) do
|
||||||
begin
|
begin
|
||||||
if s[i] in qchars then
|
if (s[i]=#10) and (#10 in qchars) then
|
||||||
backspace_quote:=backspace_quote+'\';
|
backspace_quote:=backspace_quote+'\n'
|
||||||
backspace_quote:=backspace_quote+s[i];
|
else if (s[i]=#13) and (#13 in qchars) then
|
||||||
|
backspace_quote:=backspace_quote+'\r'
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if s[i] in qchars then
|
||||||
|
backspace_quote:=backspace_quote+'\';
|
||||||
|
backspace_quote:=backspace_quote+s[i];
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1120,7 +1127,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.34 2004-01-26 22:08:20 daniel
|
Revision 1.35 2004-02-22 22:13:27 daniel
|
||||||
|
* Escape newlines in constant string stabs
|
||||||
|
|
||||||
|
Revision 1.34 2004/01/26 22:08:20 daniel
|
||||||
* Bugfix on constant strings stab generation. Never worked and still
|
* Bugfix on constant strings stab generation. Never worked and still
|
||||||
doesn't work for unknown reasons.
|
doesn't work for unknown reasons.
|
||||||
|
|
||||||
|
@ -2064,7 +2064,7 @@ implementation
|
|||||||
{even GDB v4.16 only now 'i' 'r' and 'e' !!!}
|
{even GDB v4.16 only now 'i' 'r' and 'e' !!!}
|
||||||
case consttyp of
|
case consttyp of
|
||||||
conststring:
|
conststring:
|
||||||
st:='s'''+backspace_quote(strpas(pchar(value.valueptr)),['''','"','\'])+'''';
|
st:='s'''+backspace_quote(strpas(pchar(value.valueptr)),['''','"','\',#10,#13])+'''';
|
||||||
constbool,
|
constbool,
|
||||||
constint,
|
constint,
|
||||||
constord,
|
constord,
|
||||||
@ -2367,7 +2367,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.159 2004-02-20 21:54:47 peter
|
Revision 1.160 2004-02-22 22:13:27 daniel
|
||||||
|
* Escape newlines in constant string stabs
|
||||||
|
|
||||||
|
Revision 1.159 2004/02/20 21:54:47 peter
|
||||||
* use sp_internal flag to silence unused internal variable
|
* use sp_internal flag to silence unused internal variable
|
||||||
|
|
||||||
Revision 1.158 2004/02/13 15:42:21 peter
|
Revision 1.158 2004/02/13 15:42:21 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user