mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 07:59:34 +01:00 
			
		
		
		
	* fixed placement of "size" stab for Darwin
git-svn-id: trunk@8878 -
This commit is contained in:
		
							parent
							
								
									f4d65dc92c
								
							
						
					
					
						commit
						35cb2b9c2b
					
				@ -1084,6 +1084,18 @@ implementation
 | 
			
		||||
            move(p^,p1^,strlen(p)+1);
 | 
			
		||||
            templist.concat(Tai_stab.Create(stab_stabn,p1));
 | 
			
		||||
            freemem(p,2*mangled_length+50);
 | 
			
		||||
 | 
			
		||||
            { Add a "size" stab as described in the last paragraph of 2.5 at  }
 | 
			
		||||
            { http://sourceware.org/gdb/current/onlinedocs/stabs_2.html#SEC12 }
 | 
			
		||||
            { This works at least on Darwin (and is needed on Darwin to get   }
 | 
			
		||||
            { correct smartlinking of stabs), but I don't know which binutils }
 | 
			
		||||
            { version is required on other platforms                          }
 | 
			
		||||
            { This stab must come after all other stabs for the procedure,    }
 | 
			
		||||
            { including the LBRAC/RBRAC ones                                  }
 | 
			
		||||
            if (target_info.system in systems_darwin) then
 | 
			
		||||
              templist.concat(Tai_stab.create(stab_stabs,
 | 
			
		||||
                strpnew('"",'+tostr(N_FUNCTION)+',0,0,'+stabsendlabel.name+'-'+pd.mangledname)));
 | 
			
		||||
 | 
			
		||||
            current_asmdata.asmlists[al_procedures].insertlistafter(pd.procendtai,templist);
 | 
			
		||||
 | 
			
		||||
            { "The stab representing a procedure is located immediately
 | 
			
		||||
@ -1111,18 +1123,6 @@ implementation
 | 
			
		||||
               (pd.localst.symtabletype=localsymtable) then
 | 
			
		||||
              write_symtable_syms(templist,pd.localst);
 | 
			
		||||
 | 
			
		||||
            { Add a "size" stab as described in the last paragraph of 2.5 at  }
 | 
			
		||||
            { http://sourceware.org/gdb/current/onlinedocs/stabs_2.html#SEC12 }
 | 
			
		||||
            { This works at least on Darwin (and is needed on Darwin to get   }
 | 
			
		||||
            { correct smartlinking of stabs), but I don't know which binutils }
 | 
			
		||||
            { version is required on other platforms                          }
 | 
			
		||||
            if (target_info.system in systems_darwin) then
 | 
			
		||||
              templist.concat(Tai_stab.create(stab_stabs,
 | 
			
		||||
                strpnew('"",'+tostr(N_FUNCTION)+',0,0,'+stabsendlabel.name+'-'+pd.mangledname)));
 | 
			
		||||
 | 
			
		||||
            { after the endtai, because the ".size" must come before it }
 | 
			
		||||
            current_asmdata.asmlists[al_procedures].insertlistafter(pd.procendtai,templist);
 | 
			
		||||
 | 
			
		||||
            templist.free;
 | 
			
		||||
          end;
 | 
			
		||||
      end;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user