mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 03:19:47 +01:00 
			
		
		
		
	* Bugfix on constant strings stab generation. Never worked and still
doesn't work for unknown reasons.
This commit is contained in:
		
							parent
							
								
									01adf563a9
								
							
						
					
					
						commit
						3dfde8c397
					
				@ -34,6 +34,7 @@ interface
 | 
			
		||||
    type
 | 
			
		||||
       pstring = ^string;
 | 
			
		||||
       get_var_value_proc=function(const s:string):string of object;
 | 
			
		||||
       Tcharset=set of char;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    {# Returns the minimal value between @var(a) and @var(b) }
 | 
			
		||||
@ -73,6 +74,7 @@ interface
 | 
			
		||||
       exponent value is returned in power.
 | 
			
		||||
    }
 | 
			
		||||
    function ispowerof2(value : int64;var power : longint) : boolean;
 | 
			
		||||
    function backspace_quote(const s:string;const qchars:Tcharset):string;
 | 
			
		||||
    function maybequoted(const s:string):string;
 | 
			
		||||
    function CompareText(S1, S2: string): longint;
 | 
			
		||||
 | 
			
		||||
@ -610,6 +612,20 @@ uses
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    function backspace_quote(const s:string;const qchars:Tcharset):string;
 | 
			
		||||
 | 
			
		||||
    var i:byte;
 | 
			
		||||
 | 
			
		||||
    begin
 | 
			
		||||
      backspace_quote:='';
 | 
			
		||||
      for i:=1 to length(s) do
 | 
			
		||||
        begin
 | 
			
		||||
          if s[i] in qchars then
 | 
			
		||||
            backspace_quote:=backspace_quote+'\';
 | 
			
		||||
          backspace_quote:=backspace_quote+s[i];
 | 
			
		||||
        end;
 | 
			
		||||
    end;
 | 
			
		||||
 | 
			
		||||
    function maybequoted(const s:string):string;
 | 
			
		||||
      var
 | 
			
		||||
        s1 : string;
 | 
			
		||||
@ -1104,7 +1120,11 @@ initialization
 | 
			
		||||
end.
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.33  2004-01-25 13:18:59  daniel
 | 
			
		||||
  Revision 1.34  2004-01-26 22:08:20  daniel
 | 
			
		||||
    * Bugfix on constant strings stab generation. Never worked and still
 | 
			
		||||
      doesn't work for unknown reasons.
 | 
			
		||||
 | 
			
		||||
  Revision 1.33  2004/01/25 13:18:59  daniel
 | 
			
		||||
    * Made varags parameter constant
 | 
			
		||||
 | 
			
		||||
  Revision 1.32  2004/01/25 11:33:48  daniel
 | 
			
		||||
 | 
			
		||||
@ -2150,7 +2150,7 @@ implementation
 | 
			
		||||
      {even GDB v4.16 only now 'i' 'r' and 'e' !!!}
 | 
			
		||||
      case consttyp of
 | 
			
		||||
        conststring:
 | 
			
		||||
          st:='s'''+strpas(pchar(value.valueptr))+'''';
 | 
			
		||||
          st:='s'''+backspace_quote(strpas(pchar(value.valueptr)),['''','"','\'])+'''';
 | 
			
		||||
        constbool,
 | 
			
		||||
        constint,
 | 
			
		||||
        constord,
 | 
			
		||||
@ -2171,7 +2171,7 @@ implementation
 | 
			
		||||
          { sets are not recognized by GDB}
 | 
			
		||||
          {***}
 | 
			
		||||
      end;
 | 
			
		||||
      stabstring:=stabstr_evaluate('"${name}:c=$1",${N_FUNCTION},0,${line},0',[st]);
 | 
			
		||||
      stabstring:=stabstr_evaluate('"${name}:c=$1",${N_FUNCTION},0,${line},0;',[st]);
 | 
			
		||||
    end;
 | 
			
		||||
{$endif GDB}
 | 
			
		||||
 | 
			
		||||
@ -2547,7 +2547,11 @@ implementation
 | 
			
		||||
end.
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.145  2004-01-26 16:12:28  daniel
 | 
			
		||||
  Revision 1.146  2004-01-26 22:08:20  daniel
 | 
			
		||||
    * Bugfix on constant strings stab generation. Never worked and still
 | 
			
		||||
      doesn't work for unknown reasons.
 | 
			
		||||
 | 
			
		||||
  Revision 1.145  2004/01/26 16:12:28  daniel
 | 
			
		||||
    * reginfo now also only allocated during register allocation
 | 
			
		||||
    * third round of gdb cleanups: kick out most of concatstabto
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user