diff --git a/compiler/dbgcodeview.pas b/compiler/dbgcodeview.pas index 2a419885a7..abd84ca068 100644 --- a/compiler/dbgcodeview.pas +++ b/compiler/dbgcodeview.pas @@ -188,6 +188,8 @@ interface procedure insertlineinfo(list:TAsmList);override; end; + procedure InsertLineInfo_OMF_LINNUM_MsLink(list: TAsmList); + implementation uses @@ -197,11 +199,7 @@ implementation fmodule, systems; -{**************************************************************************** - TDebugInfoCodeView -****************************************************************************} - - procedure TDebugInfoCodeView.insertlineinfo(list: TAsmList); + procedure InsertLineInfo_OMF_LINNUM_MsLink(list: TAsmList); var currfileinfo, lastfileinfo : tfileposinfo; @@ -255,6 +253,16 @@ implementation end; end; + +{**************************************************************************** + TDebugInfoCodeView +****************************************************************************} + + procedure TDebugInfoCodeView.insertlineinfo(list: TAsmList); + begin + InsertLineInfo_OMF_LINNUM_MsLink(list); + end; + {**************************************************************************** ****************************************************************************} const diff --git a/compiler/dbgdwarf.pas b/compiler/dbgdwarf.pas index a447014967..384e70d67c 100644 --- a/compiler/dbgdwarf.pas +++ b/compiler/dbgdwarf.pas @@ -461,6 +461,9 @@ implementation cpubase,cpuinfo,cgbase,paramgr, fmodule, defutil,symtable,ppu +{$ifdef OMFOBJSUPPORT} + ,dbgcodeview +{$endif OMFOBJSUPPORT} ; const @@ -3455,6 +3458,10 @@ implementation prevlabel, currlabel : tasmlabel; begin +{$ifdef OMFOBJSUPPORT} + if ds_dwarf_omf_linnum in current_settings.debugswitches then + dbgcodeview.InsertLineInfo_OMF_LINNUM_MsLink(list); +{$endif OMFOBJSUPPORT} { this function will always terminate the lineinfo block } generated_lineinfo := true; { if this unit only contains code without debug info (implicit init diff --git a/compiler/globtype.pas b/compiler/globtype.pas index 427c3b5938..36b0add09b 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -232,7 +232,15 @@ interface ds_dwarf_method_class_prefix, { Simulate C++ debug information in DWARF. It can be used for } { debuggers, which do not support Pascal. } - ds_dwarf_cpp + ds_dwarf_cpp, + { emit line number information in LINNUM/LINNUM32 records, } + { using the MS LINK format, for targets that use the OMF } + { object format. This option is useful for compatibility with } + { the Open Watcom Debugger and the Open Watcom Linker. Even } + { though, they support and use dwarf debug information in the } + { final executable file, they expect LINNUM records in the } + { object modules for the line number information. } + ds_dwarf_omf_linnum ); tdebugswitches = set of tdebugswitch; @@ -350,7 +358,7 @@ interface ); DebugSwitchStr : array[tdebugswitch] of string[22] = ('', - 'DWARFSETS','STABSABSINCLUDES','DWARFMETHODCLASSPREFIX','DWARFCPP'); + 'DWARFSETS','STABSABSINCLUDES','DWARFMETHODCLASSPREFIX','DWARFCPP','DWARFOMFLINNUM'); TargetSwitchStr : array[ttargetswitch] of ttargetswitchinfo = ( (name: ''; hasvalue: false; isglobal: true ; define: ''), diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index bcb1802683..733e9e5da5 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -3880,6 +3880,7 @@ J*2Cv_Var/out parameter copy-out checking *g3gostabsabsincludes_ Store absolute/full include file paths in Stabs *g3godwarfmethodclassprefix_ Prefix method names in DWARF with class name *g3godwarfcpp_ Simulate C++ debug information in DWARF +*g3godwarfomflinnum_ Generate line number information in OMF LINNUM records in MS LINK format in addition to the DWARF debug information (Open Watcom Debugger/Linker compatibility) *g2gp_Preserve case in stabs symbol names *g2gs_Generate Stabs debug information *g2gt_Trash local variables (to detect uninitialized uses; multiple 't' changes the trashing value) diff --git a/compiler/msgidx.inc b/compiler/msgidx.inc index 90e61ebaba..b7cbeb95bb 100644 --- a/compiler/msgidx.inc +++ b/compiler/msgidx.inc @@ -1100,7 +1100,7 @@ const option_info=11024; option_help_pages=11025; - MsgTxtSize = 81994; + MsgTxtSize = 82175; MsgIdxMax : array[1..20] of longint=( 28,106,347,126,96,59,142,34,221,67, diff --git a/compiler/msgtxt.inc b/compiler/msgtxt.inc index c28a949ec5..1d44c449a2 100644 --- a/compiler/msgtxt.inc +++ b/compiler/msgtxt.inc @@ -1,8 +1,8 @@ const msgtxt_codepage=20127; {$ifdef Delphi} -const msgtxt : array[0..000341] of string[240]=( +const msgtxt : array[0..000342] of string[240]=( {$else Delphi} -const msgtxt : array[0..000341,1..240] of char=( +const msgtxt : array[0..000342,1..240] of char=( {$endif Delphi} '01000_T_Compiler: $1'#000+ '01001_D_Compiler OS: $1'#000+ @@ -1564,142 +1564,145 @@ const msgtxt : array[0..000341,1..240] of char=( '*g3godwarfmethodclassprefix_ Prefix method names in DWARF with class n'+ 'ame'#010+ '*g3godwarfcpp','_ Simulate C++ debug information in DWARF'#010+ - '*g2gp_Preserve case in stabs symbol names'#010+ + '*g3godwarfomflinnum_ Generate line number information in OMF LINNUM re'+ + 'cords in MS LINK format in addition to the DWARF debug information (Op'+ + 'en Watcom Debugger/Linker compatibility)'#010+ + '*g2gp_Preserve ca','se in stabs symbol names'#010+ '*g2gs_Generate Stabs debug information'#010+ '*g2gt_Trash local variables (to detect uninitialized uses; multiple '#039+ 't'#039' changes the trashing value)'#010+ - '*g2gv_Generates p','rograms traceable with Valgrind'#010+ - '*g2gw_Generate DWARFv2 debug information (same as -gw2)'#010+ + '*g2gv_Generates programs traceable with Valgrind'#010+ + '*g2gw_Generate DWARFv2 debu','g information (same as -gw2)'#010+ '*g2gw2_Generate DWARFv2 debug information'#010+ '*g2gw3_Generate DWARFv3 debug information'#010+ '*g2gw4_Generate DWARFv4 debug information (experimental)'#010+ - '**1i_Inform','ation'#010+ + '**1i_Information'#010+ '**2iD_Return compiler date'#010+ - '**2iSO_Return compiler OS'#010+ + '**2iSO_Return compiler OS'#010, '**2iSP_Return compiler host processor'#010+ '**2iTO_Return target OS'#010+ '**2iTP_Return target processor'#010+ '**2iV_Return short compiler version'#010+ '**2iW_Return full compiler version'#010+ - '**2ia_Return list',' of supported ABI targets'#010+ - '**2ic_Return list of supported CPU instruction sets'#010+ + '**2ia_Return list of supported ABI targets'#010+ + '**2ic_Return list of supported CP','U instruction sets'#010+ '**2if_Return list of supported FPU instruction sets'#010+ '**2ii_Return list of supported inline assembler modes'#010+ '**2io_Return list of supported optimizations'#010+ - '**2ir_Retur','n list of recognized compiler and RTL features'#010+ - '**2it_Return list of supported targets'#010+ + '**2ir_Return list of recognized compiler and RTL features'#010+ + '**2it_Return',' list of supported targets'#010+ '**2iu_Return list of supported microcontroller types'#010+ '**2iw_Return list of supported whole program optimizations'#010+ '**1I_Add to include path'#010+ - '**1k_Pa','ss to the linker'#010+ + '**1k_Pass to the linker'#010+ '**1l_Write logo'#010+ - '**1M_Set language mode to '#010+ + '**1M_Set language m','ode to '#010+ '**2Mfpc_Free Pascal dialect (default)'#010+ '**2Mobjfpc_FPC mode with Object Pascal support'#010+ '**2Mdelphi_Delphi 7 compatibility mode'#010+ '**2Mtp_TP/BP 7.0 compatibility mode'#010+ - '**2Mmacpas','_Macintosh Pascal dialects compatibility mode'#010+ - '**2Miso_ISO 7185 mode'#010+ + '**2Mmacpas_Macintosh Pascal dialects compatibility mode'#010+ + '**2Miso_ISO 7','185 mode'#010+ '**2Mextendedpascal_ISO 10206 mode'#010+ '**2Mdelphiunicode_Delphi 2009 and later compatibility mode'#010+ '**1n_Do not read the default config files'#010+ - '**1o_Change the name of the execut','able produced to '#010+ + '**1o_Change the name of the executable produced to '#010+ '**1O_Optimizations:'#010+ - '**2O-_Disable optimizations'#010+ + '**2O-_Disable o','ptimizations'#010+ '**2O1_Level 1 optimizations (quick and debugger friendly)'#010+ '**2O2_Level 2 optimizations (-O1 + quick optimizations)'#010+ - '**2O3_Level 3 optimizations (-O2 + slow optimizations)',#010+ - '**2O4_Level 4 optimizations (-O3 + optimizations which might have unex'+ - 'pected side effects)'#010+ + '**2O3_Level 3 optimizations (-O2 + slow optimizations)'#010+ + '**2O4_Level 4 optimizations (-O3 + optimizations which mig','ht have un'+ + 'expected side effects)'#010+ '**2Oa=_Set alignment'#010+ '**2Oo[NO]_Enable or disable optimizations; see fpc -i or fpc -io fo'+ 'r possible values'#010+ - '**2Op_Set target cpu for optim','izing; see fpc -i or fpc -ic for po'+ - 'ssible values'#010+ - '**2OW_Generate whole-program optimization feedback for optimization'+ - ' ; see fpc -i or fpc -iw for possible values'#010+ + '**2Op_Set target cpu for optimizing; see fpc -i or fpc -ic for poss'+ + 'ible values'#010+ + '**2OW_G','enerate whole-program optimization feedback for optimizati'+ + 'on ; see fpc -i or fpc -iw for possible values'#010+ '**2Ow_Perform whole-program optimization ; see fpc -i or fpc -iw'+ - ' fo','r possible values'#010+ - '**2Os_Optimize for size rather than speed'#010+ + ' for possible values'#010+ + '**2Os_Optimize for size rather than speed',#010+ '**1pg_Generate profile code for gprof (defines FPC_PROFILE)'#010+ 'F*1P_Target CPU / compiler related options:'#010+ 'F*2PB_Show default compiler binary'#010+ 'F*2PP_Show default target cpu'#010+ - 'F*2P_','Set target CPU (aarch64,arm,avr,i386,i8086,jvm,m68k,mips,mip'+ + 'F*2P_Set target CPU (aarch64,arm,avr,i386,i8086,jvm,m68k,mips,mi','p'+ 'sel,powerpc,powerpc64,sparc,x86_64)'#010+ '**1R_Assembler reading style:'#010+ '**2Rdefault_Use default assembler for target'#010+ '3*2Ratt_Read AT&T style assembler'#010+ - '3*2Rintel_Read Intel style assem','bler'#010+ + '3*2Rintel_Read Intel style assembler'#010+ '4*2Ratt_Read AT&T style assembler'#010+ - '4*2Rintel_Read Intel style assembler'#010+ + '4*2Rintel_Read Intel',' style assembler'#010+ '8*2Ratt_Read AT&T style assembler'#010+ '8*2Rintel_Read Intel style assembler'#010+ '6*2RMOT_Read Motorola style assembler'#010+ '**1S_Syntax options:'#010+ '**2S2_Same as -Mobjfpc'#010+ - '**2Sc_Su','pport operators like C (*=,+=,/= and -=)'#010+ - '**2Sa_Turn on assertions'#010+ + '**2Sc_Support operators like C (*=,+=,/= and -=)'#010+ + '**2Sa_Turn on asse','rtions'#010+ '**2Sd_Same as -Mdelphi'#010+ '**2Se_Error options. is a combination of the following:'#010+ '**3*_ : Compiler halts after the errors (default is 1)'#010+ - '**3*_w : Compiler also hal','ts after warnings'#010+ - '**3*_n : Compiler also halts after notes'#010+ + '**3*_w : Compiler also halts after warnings'#010+ + '**3*_n : Compiler also halts after notes'#010, '**3*_h : Compiler also halts after hints'#010+ '**2Sf_Enable certain features in compiler and RTL; see fpc -i or fpc -'+ 'ir for possible values)'#010+ - '**2Sg_Enable LABEL and GOTO (default in -Mtp a','nd -Mdelphi)'#010+ - '**2Sh_Use reference counted strings (ansistring by default) instead of'+ - ' shortstrings'#010+ + '**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+ + '**2Sh_Use reference counted strings (ansistrin','g by default) instead '+ + 'of shortstrings'#010+ '**2Si_Turn on inlining of procedures/functions declared as "inline"'#010+ '**2Sj_Allows typed constants to be writeable (default in all modes)'#010+ - '**2Sk_L','oad fpcylix unit'#010+ + '**2Sk_Load fpcylix unit'#010+ '**2SI_Set interface style to '#010+ - '**3SIcom_COM compatible interface (default)'#010+ + '**3SIc','om_COM compatible interface (default)'#010+ '**3SIcorba_CORBA compatible interface'#010+ '**2Sm_Support macros like C (global)'#010+ '**2So_Same as -Mtp'#010+ '**2Sr_Transparent file names in ISO mode'#010+ - '**2Ss_Co','nstructor name must be init (destructor must be done)'#010+ - '**2Sv_Support vector processing (use CPU vector extensions if availabl'+ - 'e)'#010+ + '**2Ss_Constructor name must be init (destructor must be done)'#010+ + '**2Sv','_Support vector processing (use CPU vector extensions if availa'+ + 'ble)'#010+ '**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+ - '**2Sy_@ returns a typed pointer, same a','s $T+'#010+ + '**2Sy_@ returns a typed pointer, same as $T+'#010+ '**1s_Do not call assembler and linker'#010+ - '**2sh_Generate script to link on host'#010+ + '**2sh_Generate ','script to link on host'#010+ '**2st_Generate script to link on target'#010+ '**2sr_Skip register allocation phase (use with -alr)'#010+ '**1T_Target operating system:'#010+ '3*2Tandroid_Android'#010+ - '3*2Taros_ARO','S'#010+ + '3*2Taros_AROS'#010+ '3*2Tbeos_BeOS'#010+ '3*2Tdarwin_Darwin/Mac OS X'#010+ - '3*2Tembedded_Embedded'#010+ + '3*2Tembedded_Emb','edded'#010+ '3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+ '3*2Tfreebsd_FreeBSD'#010+ '3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+ '3*2Thaiku_Haiku'#010+ - '3*2Tiphonesim_iPhoneSimulator from iOS SD','K 3.2+ (older versions: -Td'+ - 'arwin)'#010+ + '3*2Tiphonesim_iPhoneSimulator from iOS SDK 3.2+ (older versions: -Tdar'+ + 'win)'#010+ '3*2Tlinux_Linux'#010+ - '3*2Tnativent_Native NT API (experimental)'#010+ + '3*2Tnativ','ent_Native NT API (experimental)'#010+ '3*2Tnetbsd_NetBSD'#010+ '3*2Tnetware_Novell Netware Module (clib)'#010+ '3*2Tnetwlibc_Novell Netware Module (libc)'#010+ '3*2Topenbsd_OpenBSD'#010+ - '3*2Tos2_OS/2 / eComStation'#010, + '3*2Tos2_OS/2 / eComStation'#010+ '3*2Tsymbian_Symbian OS'#010+ '3*2Tsolaris_Solaris'#010+ - '3*2Twatcom_Watcom compatible DOS extender'#010+ + '3*2Twatcom_Watco','m compatible DOS extender'#010+ '3*2Twdosx_WDOSX DOS extender'#010+ '3*2Twin32_Windows 32 Bit'#010+ '3*2Twince_Windows CE'#010+ '4*2Taros_AROS'#010+ '4*2Tdarwin_Darwin/Mac OS X'#010+ '4*2Tdragonfly_DragonFly BSD'#010+ - '4*2Tembedde','d_Embedded'#010+ + '4*2Tembedded_Embedded'#010+ '4*2Tfreebsd_FreeBSD'#010+ - '4*2Tiphonesim_iPhoneSimulator'#010+ + '4*2Tiphonesim_iPhoneSimulato','r'#010+ '4*2Tlinux_Linux'#010+ '4*2Tnetbsd_NetBSD'#010+ '4*2Topenbsd_OpenBSD'#010+ @@ -1707,10 +1710,10 @@ const msgtxt : array[0..000341,1..240] of char=( '4*2Twin64_Win64 (64 bit Windows systems)'#010+ '6*2Tamiga_Commodore Amiga'#010+ '6*2Tatari_Atari ST/STe/TT'#010+ - '6*2Tembedded','_Embedded'#010+ + '6*2Tembedded_Embedded'#010+ '6*2Tlinux_Linux'#010+ '6*2Tnetbsd_NetBSD'#010+ - '6*2Tmacos_Mac OS'#010+ + '6*2Tmacos_Mac O','S'#010+ '6*2Tpalmos_PalmOS'#010+ '8*2Tembedded_Embedded'#010+ '8*2Tmsdos_MS-DOS (and compatible)'#010+ @@ -1718,10 +1721,10 @@ const msgtxt : array[0..000341,1..240] of char=( 'A*2Tandroid_Android'#010+ 'A*2Taros_AROS'#010+ 'A*2Tdarwin_Darwin/iPhoneOS/iOS'#010+ - 'A*2Tembedded_Em','bedded'#010+ + 'A*2Tembedded_Embedded'#010+ 'A*2Tgba_Game Boy Advance'#010+ 'A*2Tlinux_Linux'#010+ - 'A*2Tnds_Nintendo DS'#010+ + 'A*2Tnds_Nin','tendo DS'#010+ 'A*2Tnetbsd_NetBSD'#010+ 'A*2Tpalmos_PalmOS'#010+ 'A*2Tsymbian_Symbian'#010+ @@ -1731,10 +1734,10 @@ const msgtxt : array[0..000341,1..240] of char=( 'J*2Tandroid_Android'#010+ 'J*2Tjava_Java'#010+ 'm*2Tandroid_Android'#010+ - 'm*2','Tembedded_Embedded'#010+ + 'm*2Tembedded_Embedded'#010+ 'm*2Tlinux_Linux'#010+ 'M*2Tembedded_Embedded'#010+ - 'M*2Tlinux_Linux'#010+ + 'M*','2Tlinux_Linux'#010+ 'P*2Taix_AIX'#010+ 'P*2Tamiga_AmigaOS'#010+ 'P*2Tdarwin_Darwin/Mac OS X'#010+ @@ -1743,10 +1746,10 @@ const msgtxt : array[0..000341,1..240] of char=( 'P*2Tmacos_Mac OS (classic)'#010+ 'P*2Tmorphos_MorphOS'#010+ 'P*2Tnetbsd_NetBSD'#010+ - 'P*2Twii','_Wii'#010+ + 'P*2Twii_Wii'#010+ 'p*2Taix_AIX'#010+ 'p*2Tdarwin_Darwin/Mac OS X'#010+ - 'p*2Tembedded_Embedded'#010+ + 'p*2Tembedded_Em','bedded'#010+ 'p*2Tlinux_Linux'#010+ 'S*2Tlinux_Linux'#010+ 'S*2Tsolaris_Solaris'#010+ @@ -1754,143 +1757,143 @@ const msgtxt : array[0..000341,1..240] of char=( 'V*2Tembedded_Embedded'#010+ '**1u_Undefines the symbol '#010+ '**1U_Unit options:'#010+ - '**2Un_Do not check where the uni','t name matches the file name'#010+ - '**2Ur_Generate release unit files (never automatically recompiled)'#010+ + '**2Un_Do not check where the unit name matches the file name'#010+ + '**2Ur_Generate release unit fi','les (never automatically recompiled)'#010+ '**2Us_Compile a system unit'#010+ '**1v_Be verbose. is a combination of the following letters:'#010+ - '**2*_e : Show errors (default) 0 : Show not','hing (except errors'+ - ')'#010+ - '**2*_w : Show warnings u : Show unit info'#010+ + '**2*_e : Show errors (default) 0 : Show nothing (except errors)'#010+ + '**2*_w : Show warnings u',' : Show unit info'#010+ '**2*_n : Show notes t : Show tried/used files'#010+ '**2*_h : Show hints c : Show conditionals'#010+ - '**2*_i : Show general info d : ','Show debug info'#010+ - '**2*_l : Show linenumbers r : Rhide/GCC compatibility mode'#010+ + '**2*_i : Show general info d : Show debug info'#010+ + '**2*_l : Show linenumbers r : Rh','ide/GCC compatibility mod'+ + 'e'#010+ '**2*_s : Show time stamps q : Show message numbers'#010+ '**2*_a : Show everything x : Show info about invoked tools'+ #010+ - '**2*_b : Write file n','ames messages p : Write tree.log with parse t'+ - 'ree'#010+ - '**2*_ with full path v : Write fpcdebug.txt with'#010+ + '**2*_b : Write file names messages p : Write tree.log with parse tre'+ + 'e'#010+ + '**2*_ ',' with full path v : Write fpcdebug.txt with'#010+ '**2*_z : Write output to stderr lots of debugging info'#010+ '**2*_m, : Do not show messages numbered and '#010+ - 'F*','1V_Append '#039'-'#039' to the used compiler binary name (e.g.'+ - ' for version)'#010+ + 'F*1V_Append '#039'-'#039' to the used compiler binary name (e.g. ', + 'for version)'#010+ '**1W_Target-specific options (targets)'#010+ '3*2WA_Specify native type application (Windows)'#010+ '4*2WA_Specify native type application (Windows)'#010+ - 'A*2WA_Specify native type appl','ication (Windows)'#010+ - '3*2Wb_Create a bundle instead of a library (Darwin)'#010+ + 'A*2WA_Specify native type application (Windows)'#010+ + '3*2Wb_Create a bundle instead of a librar','y (Darwin)'#010+ 'P*2Wb_Create a bundle instead of a library (Darwin)'#010+ 'p*2Wb_Create a bundle instead of a library (Darwin)'#010+ 'a*2Wb_Create a bundle instead of a library (Darwin)'#010+ - 'A*2Wb_Create a',' bundle instead of a library (Darwin)'#010+ - '4*2Wb_Create a bundle instead of a library (Darwin)'#010+ + 'A*2Wb_Create a bundle instead of a library (Darwin)'#010+ + '4*2Wb_Create a bundle',' instead of a library (Darwin)'#010+ '3*2WB_Create a relocatable image (Windows, Symbian)'#010+ '3*2WB_Set image base to (Windows, Symbian)'#010+ '4*2WB_Create a relocatable image (Windows)'#010+ - '4*2WB','_Set image base to (Windows)'#010+ - 'A*2WB_Create a relocatable image (Windows, Symbian)'#010+ + '4*2WB_Set image base to (Windows)'#010+ + 'A*2WB_Create a relocata','ble image (Windows, Symbian)'#010+ 'A*2WB_Set image base to (Windows, Symbian)'#010+ '3*2WC_Specify console type application (EMX, OS/2, Windows)'#010+ - '4*2WC_Specify console type application (Wi','ndows)'#010+ + '4*2WC_Specify console type application (Windows)'#010+ 'A*2WC_Specify console type application (Windows)'#010+ - 'P*2WC_Specify console type application (Classic Mac OS)'#010+ + 'P*2','WC_Specify console type application (Classic Mac OS)'#010+ '3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ '4*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ - 'A*2W','D_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ - '3*2We_Use external resources (Darwin)'#010+ + 'A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+ + '3','*2We_Use external resources (Darwin)'#010+ '4*2We_Use external resources (Darwin)'#010+ 'a*2We_Use external resources (Darwin)'#010+ 'A*2We_Use external resources (Darwin)'#010+ - 'P*2We_Use external resources (','Darwin)'#010+ + 'P*2We_Use external resources (Darwin)'#010+ 'p*2We_Use external resources (Darwin)'#010+ - '3*2WF_Specify full-screen type application (EMX, OS/2)'#010+ + '3*2WF_Specify',' full-screen type application (EMX, OS/2)'#010+ '3*2WG_Specify graphic type application (EMX, OS/2, Windows)'#010+ '4*2WG_Specify graphic type application (Windows)'#010+ - 'A*2WG_Specify graphic type app','lication (Windows)'#010+ - 'P*2WG_Specify graphic type application (Classic Mac OS)'#010+ + 'A*2WG_Specify graphic type application (Windows)'#010+ + 'P*2WG_Specify graphic type application (','Classic Mac OS)'#010+ '3*2Wi_Use internal resources (Darwin)'#010+ '4*2Wi_Use internal resources (Darwin)'#010+ 'a*2Wi_Use internal resources (Darwin)'#010+ 'A*2Wi_Use internal resources (Darwin)'#010+ - 'P*2Wi_Use int','ernal resources (Darwin)'#010+ - 'p*2Wi_Use internal resources (Darwin)'#010+ + 'P*2Wi_Use internal resources (Darwin)'#010+ + 'p*2Wi_Use internal resources (Darw','in)'#010+ '3*2WI_Turn on/off the usage of import sections (Windows)'#010+ '4*2WI_Turn on/off the usage of import sections (Windows)'#010+ 'A*2WI_Turn on/off the usage of import sections (Windows)'#010+ - '8*2Wh_','Use huge code for units (ignored for models with CODE in a uni'+ + '8*2Wh_Use huge code for units (ignored for models with CODE in a ','uni'+ 'que segment)'#010+ '8*2Wm_Set memory model'#010+ '8*3WmTiny_Tiny memory model'#010+ '8*3WmSmall_Small memory model (default)'#010+ '8*3WmMedium_Medium memory model'#010+ '8*3WmCompact_Compact memory model'#010+ - '8*3Wm','Large_Large memory model'#010+ + '8*3WmLarge_Large memory model'#010+ '8*3WmHuge_Huge memory model'#010+ - '3*2WM_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+ - 'n)'#010+ + '3*2WM<','x>_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Dar'+ + 'win)'#010+ '4*2WM_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+ 'n)'#010+ - 'p*2WM_Minimum Mac OS X deployment vers','ion: 10.4, 10.5.1, ... (Dar'+ - 'win)'#010+ - 'P*2WM_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+ + 'p*2WM_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+ 'n)'#010+ + 'P*2WM_Minimum Mac OS X d','eployment version: 10.4, 10.5.1, ... (Dar'+ + 'win)'#010+ '3*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+ - '4*2WN_Do not generate relocation code, needed for debugging (Wind','ows'+ + '4*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+ + 'A*2WN_Do not generate relocation code, needed for debu','gging (Windows'+ ')'#010+ - 'A*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+ 'A*2Wp_Specify the controller type; see fpc -i or fpc -iu for possib'+ 'le values'#010+ 'm*2Wp_Specify the controller type; see fpc -i or fpc -iu for possib'+ 'le values'#010+ - 'V*2Wp','_Specify the controller type; see fpc -i or fpc -iu for poss'+ + 'V*2Wp_Specify the controller type; see fpc -i or fpc -iu for ','poss'+ 'ible values'#010+ '3*2WP_Minimum iOS deployment version: 3.0, 5.0.1, ... (iphonesim)'#010+ '4*2WP_Minimum iOS deployment version: 8.0, 8.0.2, ... (iphonesim)'#010+ - 'a*2WP_Minimum iOS deploy','ment version: 7.0, 7.1.2, ... (Darwin)'#010+ - 'A*2WP_Minimum iOS deployment version: 3.0, 5.0.1, ... (Darwin)'#010+ + 'a*2WP_Minimum iOS deployment version: 7.0, 7.1.2, ... (Darwin)'#010+ + 'A*2WP_Minimum iOS',' deployment version: 3.0, 5.0.1, ... (Darwin)'#010+ '3*2WR_Generate relocation code (Windows)'#010+ '4*2WR_Generate relocation code (Windows)'#010+ 'A*2WR_Generate relocation code (Windows)'#010+ - '8*2Wt_Set',' the target executable format'#010+ - '8*3Wtexe_Create a DOS .EXE file (default)'#010+ + '8*2Wt_Set the target executable format'#010+ + '8*3Wtexe_Create a DOS .EXE fi','le (default)'#010+ '8*3Wtcom_Create a DOS .COM file (requires tiny memory model)'#010+ 'P*2WT_Specify MPW tool type application (Classic Mac OS)'#010+ '**2WX_Enable executable stack (Linux)'#010+ - '**1X_Executa','ble options:'#010+ - '**2X9_Generate linkerscript for GNU Binutils ld older than version 2.1'+ - '9.1 (Linux)'#010+ + '**1X_Executable options:'#010+ + '**2X9_Generate linkerscript for GNU Binutils l','d older than version 2'+ + '.19.1 (Linux)'#010+ '**2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Lin'+ 'ux)'#010+ '**2Xd_Do not search default library path (sometimes required for cross'+ - '-','compiling when not using -XR)'#010+ + '-compiling when not using -XR)'#010+ '**2Xe_Use external linker'#010+ - '**2Xf_Substitute pthread library name for linking (BSD)'#010+ + '**2','Xf_Substitute pthread library name for linking (BSD)'#010+ '**2Xg_Create debuginfo in a separate file and add a debuglink section '+ 'to executable'#010+ - '**2XD_Try to link units dynamically (de','fines FPC_LINK_DYNAMIC)'#010+ + '**2XD_Try to link units dynamically (defines FPC_LINK_DYNAMIC)'#010+ '**2Xi_Use internal linker'#010+ - '**2XLA_Define library substitutions for linking'#010+ + '**2XLA_De','fine library substitutions for linking'#010+ '**2XLO_Define order of library linking'#010+ '**2XLD_Exclude default order of standard libraries'#010+ '**2Xm_Generate link map'#010+ - '**2XM_Set the name of the',' '#039'main'#039' program routine (default'+ - ' is '#039'main'#039')'#010+ - '**2Xn_Use target system native linker instead of GNU ld (Solaris, AIX)'+ - #010+ + '**2XM_Set the name of the '#039'main'#039' program routine (default i'+ + 's '#039'main'#039')'#010+ + '**2Xn_Use targe','t system native linker instead of GNU ld (Solaris, AI'+ + 'X)'#010+ 'F*2Xp_First search for the compiler binary in the directory '#010+ '**2XP_Prepend the binutils names with the prefix '#010+ - '**','2Xr_Set the linker'#039's rlink-path to (needed for cross co'+ + '**2Xr_Set the linker'#039's rlink-path to (needed for cross',' co'+ 'mpile, see the ld manual for more information) (BeOS, Linux)'#010+ '**2XR_Prepend to all linker search paths (BeOS, Darwin, FreeBSD'+ ', Linux, Mac OS, Solaris)'#010+ - '**2Xs_Strip all symbo','ls from executable'#010+ - '**2XS_Try to link units statically (default, defines FPC_LINK_STATIC)'#010+ + '**2Xs_Strip all symbols from executable'#010+ + '**2XS_Try to link units statically (defa','ult, defines FPC_LINK_STATIC'+ + ')'#010+ '**2Xt_Link with static libraries (-static is passed to linker)'#010+ '**2Xv_Generate table for Virtual Entry calls'#010+ - '**2XV_Use VLink as external linker (d','efault on Amiga, MorphOS)'+ - #010+ - '**2XX_Try to smartlink units (defines FPC_LINK_SMART)'#010+ + '**2XV_Use VLink as external linker (default on Amiga, MorphOS)'#010+ + '**2XX_Try to smartlink units ',' (defines FPC_LINK_SMART)'#010+ '**1*_'#010+ '**1?_Show this help'#010+ '**1h_Shows this help without waiting' diff --git a/compiler/ogomf.pas b/compiler/ogomf.pas index 2b5758cd03..b08a0ae8e0 100644 --- a/compiler/ogomf.pas +++ b/compiler/ogomf.pas @@ -989,7 +989,9 @@ implementation RawRecord.WriteTo(FWriter); Translator_COMENT.Free; - if target_dbg.id=dbg_codeview then + if (target_dbg.id=dbg_codeview) or + ((ds_dwarf_omf_linnum in current_settings.debugswitches) and + (target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4])) then begin DebugFormat_COMENT:=TOmfRecord_COMENT.Create; DebugFormat_COMENT.CommentClass:=CC_NewOmfExtension;