mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:06:08 +02:00
* bugfixes for reset_gdb_info
in MEM parsing for go32v2 better external symbol creation support for rhgdb.exe (lowercase file names)
This commit is contained in:
parent
0fb05fec2a
commit
c937f63b10
@ -158,8 +158,7 @@ implementation
|
||||
end
|
||||
else
|
||||
p^.location.reference.symbol:=stringdup(p^.symtableentry^.mangledname);
|
||||
if p^.symtableentry^.owner^.symtabletype=unitsymtable then
|
||||
concat_external(p^.symtableentry^.mangledname,EXT_NEAR);
|
||||
maybe_concat_external(p^.symtableentry^.owner,p^.symtableentry^.mangledname);
|
||||
end;
|
||||
varsym :
|
||||
begin
|
||||
@ -296,15 +295,13 @@ implementation
|
||||
stringdispose(p^.location.reference.symbol);
|
||||
p^.location.reference.symbol:=
|
||||
stringdup(pprocsym(p^.symtableentry)^.definition^.mangledname);
|
||||
if p^.symtable^.symtabletype=unitsymtable then
|
||||
concat_external(p^.symtableentry^.mangledname,EXT_NEAR);
|
||||
maybe_concat_external(p^.symtable,p^.symtableentry^.mangledname);
|
||||
end;
|
||||
typedconstsym :
|
||||
begin
|
||||
stringdispose(p^.location.reference.symbol);
|
||||
p^.location.reference.symbol:=stringdup(p^.symtableentry^.mangledname);
|
||||
if p^.symtable^.symtabletype=unitsymtable then
|
||||
concat_external(p^.symtableentry^.mangledname,EXT_NEAR);
|
||||
maybe_concat_external(p^.symtable,p^.symtableentry^.mangledname);
|
||||
end;
|
||||
else internalerror(4);
|
||||
end;
|
||||
@ -604,7 +601,7 @@ implementation
|
||||
{$ifndef MAKELIB}
|
||||
consts^.insert(new(pai_label,init(lastlabel)));
|
||||
{$else MAKELIB}
|
||||
consts^.insert(new(pai_symbol,init_global('$'+current_module^.name^
|
||||
consts^.insert(new(pai_symbol,init_global('$'+current_module^.unitname^
|
||||
+'$real_const'+tostr(p^.labnumber))));
|
||||
consts^.insert(new(pai_cut,init));
|
||||
{$endif MAKELIB}
|
||||
@ -614,7 +611,7 @@ implementation
|
||||
{$ifndef MAKELIB}
|
||||
p^.location.reference.symbol:=stringdup(lab2str(lastlabel));
|
||||
{$else MAKELIB}
|
||||
p^.location.reference.symbol:=stringdup('$'+current_module^.name^
|
||||
p^.location.reference.symbol:=stringdup('$'+current_module^.unitname^
|
||||
+'$real_const'+tostr(p^.labnumber));
|
||||
{$endif MAKELIB}
|
||||
end;
|
||||
@ -705,7 +702,7 @@ implementation
|
||||
{$ifndef MAKELIB}
|
||||
consts^.insert(new(pai_label,init(lastlabel)));
|
||||
{$else MAKELIB}
|
||||
consts^.insert(new(pai_symbol,init_global('$'+current_module^.name^
|
||||
consts^.insert(new(pai_symbol,init_global('$'+current_module^.unitname^
|
||||
+'$string_const'+tostr(p^.labstrnumber))));
|
||||
consts^.insert(new(pai_cut,init));
|
||||
{$endif MAKELIB}
|
||||
@ -715,7 +712,7 @@ implementation
|
||||
{$ifndef MAKELIB}
|
||||
p^.location.reference.symbol:=stringdup(lab2str(lastlabel));
|
||||
{$else MAKELIB}
|
||||
p^.location.reference.symbol:=stringdup('$'+current_module^.name^
|
||||
p^.location.reference.symbol:=stringdup('$'+current_module^.unitname^
|
||||
+'$string_const'+tostr(p^.labstrnumber));
|
||||
{$endif MAKELIB}
|
||||
p^.location.loc := LOC_MEM;
|
||||
@ -2700,7 +2697,8 @@ implementation
|
||||
loadesi:=true;
|
||||
exprasmlist^.concat(new(pai386,op_csymbol_reg(A_MOV,S_L,
|
||||
newcsymbol(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,0),R_ESI)));
|
||||
concat_external(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,EXT_NEAR);
|
||||
maybe_concat_external(pobjectdef(p^.methodpointer^.resulttype)^.owner,
|
||||
pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname);
|
||||
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,R_ESI)));
|
||||
end
|
||||
else
|
||||
@ -2737,7 +2735,8 @@ implementation
|
||||
{ insert the vmt }
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,
|
||||
newcsymbol(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,0))));
|
||||
concat_external(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,EXT_NEAR);
|
||||
maybe_concat_external(pobjectdef(p^.methodpointer^.resulttype)^.owner,
|
||||
pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname);
|
||||
extended_new:=true;
|
||||
end;
|
||||
hdisposen:
|
||||
@ -2752,7 +2751,8 @@ implementation
|
||||
exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,R_ESI)));
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,
|
||||
newcsymbol(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,0))));
|
||||
concat_external(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,EXT_NEAR);
|
||||
maybe_concat_external(pobjectdef(p^.methodpointer^.resulttype)^.owner,
|
||||
pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname);
|
||||
end;
|
||||
else
|
||||
begin
|
||||
@ -2806,8 +2806,8 @@ implementation
|
||||
exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,
|
||||
newcsymbol(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,
|
||||
0))));
|
||||
concat_external(pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname,
|
||||
EXT_NEAR);
|
||||
maybe_concat_external(pobjectdef(p^.methodpointer^.resulttype)^.owner,
|
||||
pobjectdef(p^.methodpointer^.resulttype)^.vmt_mangledname);
|
||||
end
|
||||
{ destructors haven't to dispose the instance, if this is }
|
||||
{ a direct call }
|
||||
@ -2969,7 +2969,9 @@ implementation
|
||||
end
|
||||
else
|
||||
emitcall(p^.procdefinition^.mangledname,
|
||||
p^.symtableproc^.symtabletype=unitsymtable);
|
||||
(p^.symtableproc^.symtabletype=unitsymtable) or
|
||||
((p^.symtableproc^.symtabletype=objectsymtable) and
|
||||
(pobjectdef(p^.symtableproc^.defowner)^.owner^.symtabletype=unitsymtable)));
|
||||
if ((p^.procdefinition^.options and poclearstack)<>0) then
|
||||
begin
|
||||
{ consider the alignment with the rest (PM) }
|
||||
@ -5673,7 +5675,13 @@ do_jmp:
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-03-28 23:09:55 florian
|
||||
Revision 1.4 1998-04-07 13:19:42 pierre
|
||||
* bugfixes for reset_gdb_info
|
||||
in MEM parsing for go32v2
|
||||
better external symbol creation
|
||||
support for rhgdb.exe (lowercase file names)
|
||||
|
||||
Revision 1.3 1998/03/28 23:09:55 florian
|
||||
* secondin bugfix (m68k and i386)
|
||||
* overflow checking bugfix (m68k and i386) -- pretty useless in
|
||||
secondadd, since everything is done using 32-bit
|
||||
|
@ -640,6 +640,7 @@ unit pexpr;
|
||||
p2:=expr;
|
||||
{ support SEG:OFS for go32v2 Mem[] }
|
||||
if (target_info.target=target_GO32V2) and
|
||||
(p1^.treetype=loadn) and
|
||||
assigned(p1^.symtableentry) and
|
||||
assigned(p1^.symtableentry^.owner^.name) and
|
||||
(p1^.symtableentry^.owner^.name^='SYSTEM') and
|
||||
@ -663,6 +664,20 @@ unit pexpr;
|
||||
p1^.memindex:=true;
|
||||
end;
|
||||
end
|
||||
{ else
|
||||
if (target_info.target=target_GO32V2) and
|
||||
assigned(p1^.symtableentry) and
|
||||
assigned(p1^.symtableentry^.owner^.name) and
|
||||
(p1^.symtableentry^.owner^.name^='SYSTEM') and
|
||||
((p1^.symtableentry^.name='PORT') or
|
||||
(p1^.symtableentry^.name='PORTW') or
|
||||
(p1^.symtableentry^.name='PORTL')) then
|
||||
begin
|
||||
p1:=gennode(vecn,p1,p2);
|
||||
p1^.portindex:=true;
|
||||
p
|
||||
end;
|
||||
end }
|
||||
else
|
||||
p1:=gennode(vecn,p1,p2);
|
||||
if pd^.deftype=stringdef then
|
||||
@ -1538,7 +1553,13 @@ unit pexpr;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 1998-03-26 11:18:31 florian
|
||||
Revision 1.3 1998-04-07 13:19:46 pierre
|
||||
* bugfixes for reset_gdb_info
|
||||
in MEM parsing for go32v2
|
||||
better external symbol creation
|
||||
support for rhgdb.exe (lowercase file names)
|
||||
|
||||
Revision 1.2 1998/03/26 11:18:31 florian
|
||||
- switch -Sa removed
|
||||
- support of a:=b:=0 removed
|
||||
|
||||
|
@ -50,16 +50,24 @@
|
||||
|
||||
{$ifdef FPC}
|
||||
{$ifndef GDB}
|
||||
{ people can try to compile without GDB }
|
||||
{$error The compiler switch GDB must be defined}
|
||||
{$endif GDB}
|
||||
{ but I386 or M68K must be defined }
|
||||
{ and only one of the two }
|
||||
{$ifndef I386}
|
||||
{$ifndef M68K}
|
||||
{$error One of the switches I386 or M68K must be defined}
|
||||
{$fatalerror One of the switches I386 or M68K must be defined}
|
||||
{$endif M68K}
|
||||
{$endif I386}
|
||||
{$ifdef I386}
|
||||
{$ifdef M68K}
|
||||
{$fatalerror ONLY one of the switches I386 or M68K must be defined}
|
||||
{$endif M68K}
|
||||
{$endif I386}
|
||||
{$ifdef support_mmx}
|
||||
{$ifndef i386}
|
||||
{$error I386 switch must be on}
|
||||
{$fatalerror I386 switch must be on for MMX support}
|
||||
{$endif i386}
|
||||
{$endif support_mmx}
|
||||
{$endif}
|
||||
@ -68,7 +76,7 @@
|
||||
{$IFNDEF DPMI}
|
||||
{$M 24576,0,655360}
|
||||
{$ELSE}
|
||||
{$M 49152}
|
||||
{$M 65000}
|
||||
{$ENDIF DPMI}
|
||||
{$E+,N+,F+,S-,R-}
|
||||
{$endif TP}
|
||||
@ -117,6 +125,13 @@ uses
|
||||
{$ifdef LINUX}
|
||||
catch,
|
||||
{$endif LINUX}
|
||||
{$IfDef PMD}
|
||||
OpenFiles,
|
||||
BBError,
|
||||
ObjMemory,
|
||||
PMD, MemCheck,
|
||||
{$EndIf}
|
||||
|
||||
dos,objects,cobjects,
|
||||
globals,parser,systems,tree,symtable,options,link,import,files,
|
||||
verb_def,verbose;
|
||||
@ -356,8 +371,14 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 1998-03-25 11:18:14 root
|
||||
Initial revision
|
||||
Revision 1.2 1998-04-07 13:19:47 pierre
|
||||
* bugfixes for reset_gdb_info
|
||||
in MEM parsing for go32v2
|
||||
better external symbol creation
|
||||
support for rhgdb.exe (lowercase file names)
|
||||
|
||||
Revision 1.1.1.1 1998/03/25 11:18:14 root
|
||||
* Restored version
|
||||
|
||||
Revision 1.40 1998/03/16 22:42:21 florian
|
||||
* some fixes of Peter applied:
|
||||
|
@ -177,8 +177,8 @@ unit ptconst;
|
||||
begin
|
||||
datasegment^.concat(new(pai_const,init_symbol(
|
||||
strpnew(p^.left^.symtableentry^.mangledname))));
|
||||
if p^.left^.symtableentry^.owner^.symtabletype=unitsymtable then
|
||||
concat_external(p^.left^.symtableentry^.mangledname,EXT_NEAR);
|
||||
maybe_concat_external(p^.left^.symtableentry^.owner,
|
||||
p^.left^.symtableentry^.mangledname);
|
||||
end
|
||||
else
|
||||
Message(cg_e_illegal_expression);
|
||||
@ -437,8 +437,14 @@ unit ptconst;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 1998-03-25 11:18:15 root
|
||||
Initial revision
|
||||
Revision 1.2 1998-04-07 13:19:48 pierre
|
||||
* bugfixes for reset_gdb_info
|
||||
in MEM parsing for go32v2
|
||||
better external symbol creation
|
||||
support for rhgdb.exe (lowercase file names)
|
||||
|
||||
Revision 1.1.1.1 1998/03/25 11:18:15 root
|
||||
* Restored version
|
||||
|
||||
Revision 1.13 1998/03/20 23:31:35 florian
|
||||
* bug0113 fixed
|
||||
|
@ -331,17 +331,32 @@ for the last instruction of an include file !}
|
||||
procedure src_comment;forward;
|
||||
|
||||
|
||||
var prevc : char;
|
||||
|
||||
procedure nextchar;
|
||||
|
||||
begin
|
||||
c:=inputbuffer[inputpointer];
|
||||
inc(inputpointer);
|
||||
if c=#0 then
|
||||
reload;
|
||||
|
||||
if c in [#10,#13] then
|
||||
begin
|
||||
{ here there was a problem if the inputbuffer
|
||||
stopped at #13 and the next at #10
|
||||
because two newlines where counted !! }
|
||||
write_line;
|
||||
if (byte(inputbuffer[inputpointer])+byte(c)=23) then
|
||||
inc(inputpointer);
|
||||
write_line;
|
||||
if (inputbuffer[inputpointer]=#0) and
|
||||
current_module^.current_inputfile^.filenotatend then
|
||||
begin
|
||||
prevc:=c;
|
||||
reload;
|
||||
if (byte(c)+byte(prevc)=23) then
|
||||
inc(inputpointer);
|
||||
end;
|
||||
c:=newline;
|
||||
end;
|
||||
end;
|
||||
@ -2087,7 +2102,13 @@ for the last instruction of an include file !}
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1998-03-29 17:27:59 florian
|
||||
Revision 1.4 1998-04-07 13:19:49 pierre
|
||||
* bugfixes for reset_gdb_info
|
||||
in MEM parsing for go32v2
|
||||
better external symbol creation
|
||||
support for rhgdb.exe (lowercase file names)
|
||||
|
||||
Revision 1.3 1998/03/29 17:27:59 florian
|
||||
* aopt386 compiles with TP
|
||||
* correct line number is displayed, if a #0 is in the input
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user