based on patches by Colin Western, mantis #38483)
o requires that the program/library is compiled with -Xg (or that
dsymutil is run on it after compiling), and that the .dSYM bundle
is in the same directory as the program/library
o always use the "dl" unit in exeinfo for Darwin, as that's needed for
dynamic library support, and this does not cause an extra dependency
since on Darwin we always use libc
o cleaned up the exeinfo unit for Darwin, and sped it up by using mmap
instead of small reads
o fixed unit dependencies for exeinfo, lineinfo and lnfodwarf in Darwin
RTL Makefile
* use the process address info from the original exe even when reading
the debug information from an external file
- removed outdated ifdef'd darwin code from dl.pp (no longer needed now
that processaddress gets set correctly in exeinfo for that platform)
git-svn-id: trunk@49140 -
(cherry picked from commit 0eb9dd3879)
U rtl/darwin/sysctlh.inc
--- Recording mergeinfo for merge of r49115 into '.':
U .
# revisions: 49115
r49115 | marco | 2021-04-03 21:42:11 +0200 (Sat, 03 Apr 2021) | 1 line
Changed paths:
M /trunk/rtl/darwin/sysctlh.inc
* patch from mantis 37205, add OS X sysctl constants
git-svn-id: branches/fixes_3_2@49116 -
------------------------------------------------------------------------
r42024 | pierre | 2019-05-10 07:23:31 +0000 (Fri, 10 May 2019) | 1 line
Use TIOCtlRequest type for local variable nr inside TCSetAttr function
------------------------------------------------------------------------
------------------------------------------------------------------------
r42024 | pierre | 2019-05-10 07:23:31 +0000 (Fri, 10 May 2019) | 1 line
Use TIOCtlRequest type for local variable nr inside TCSetAttr function
------------------------------------------------------------------------
--- Merging r42024 into '.':
U rtl/beos/termiosproc.inc
U rtl/darwin/termiosproc.inc
U rtl/haiku/termiosproc.inc
U rtl/linux/termiosproc.inc
U rtl/netbsd/termiosproc.inc
U rtl/openbsd/termiosproc.inc
--- Recording mergeinfo for merge of r42024 into '.':
U .
git-svn-id: branches/fixes_3_2@42125 -
Adjust non-Windows resources to work with indirect main information as well.
rtl/inc/systemh.inc, TEntryInformation:
+ new cross platform field ResLocation which stores the pointer to the resources
rtl/inc/intres.inc:
* change the type of ResHeader from PResHdr to PPResHdr (and adjust code that uses it accordingly; Note: the first dereferencing is assumed to be always valid!)
* adjust declaration of ResHeader depending on whether indirect main information is used or not
rtl/darwin/sysinit.pas & rtl/linux/si_impl.inc:
* pass the location of the resources through SysInitEntryInformation
rtl/bsd/system.pp & rtl/linux/system.pp:
+ new public variable FPCResLocation which is setup by SysEntry
rtl/win32/sysinit.inc:
* initialize ResLocation of SysInitEntryInformation as Nil
rtl/win32/system.pp:
* initialize ResLocation of EntryInformation as Nil
........
For systems that support both internal and external resources (in this case only Darwin ones) we need to generate the FPC_RESLOCATION symbol always, because the SysInit unit is resource type agnostic.
ngenutil.pas, tnodeutils:
* InsertResourceInfo: generate FPC_RESLOCATION symbol pointing to 0 in case the program is compiled on Darwin with resources set to external ones (-We)
git-svn-id: trunk@33952 -
Switch Mac OS X to indirect entry information.
compiler/systems/t_bsd.pas, TLinkerBSD:
+ implement InitSysInitUnitName
compiler/system.pas:
* systems_internal_sysinit: add Darwin systems
compiler/hlcgobj.pas, thlcgobj:
* gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead
rtl/darwin:
+ add sysinit.pas unit which contains the executable and library entry points for Darwin
rtl/darwin/Makefile.fpc:
* add sysinit unit
rtl/bsd/sysosh.inc:
+ add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...)
rtl/bsd/system.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x
+ add EntryInformation variable (this could maybe moved to system.inc...)
+ add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL
* the old FPC_SYSTEMMAIN is still in place for bootstrapping
rtl/inc/systemh.inc, TEntryInformation:
* PascalMain is cdecl on non-Windows systems (ToDo: really?)
rtl/inc/system.inc:
* initialstklen is provided by the indirect entry information, so no external here
........
Fix bootstrapping.
rtl/darwin/sysinit.pas:
* enable the code only when no longer bootstrapping with 2.6.x
........
Fix bootstrapping.
rtl/objpas/objpas.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x
........
rtl/darwin/sysinit.pas:
* reference PASCALMAIN correctly (I wonder how this even worked previously :/ )
git-svn-id: trunk@33949 -
* also made lnfodwrf dependent on lineinfo for all platforms,
because both units implicitly depend on the exeinfo unit
and if both are compiled at the same time they can fall
over each other while writing its .ppu or .s file
git-svn-id: trunk@33039 -