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