Commit Graph

53 Commits

Author SHA1 Message Date
nickysn
2c000d1e74 * processaddress's type changed to word on i8086 (ptruint changes size between
memory models and we only need the offset; the segment is tracked separately)
+ introduce texefile.processsegment on i8086
* initialize processaddress and processsegment properly on i8086-msdos (for .exe
  files; .com files are not supported yet)

git-svn-id: trunk@39052 -
2018-05-20 13:19:49 +00:00
nickysn
c8cbb1daea * changed the sechdrofs,secstrofs and ImgOffset types to 32-bit to prevent
overflow errors on i8086 (ptruint is 16-bit in certain i8086 memory models;
  file offsets, however, still remain 32-bit)

git-svn-id: trunk@39036 -
2018-05-20 11:26:40 +00:00
nickysn
0d8ba2ddfa * skip the MZ exe in order to reach the ELF32 image on i8086-msdos
git-svn-id: trunk@39032 -
2018-05-20 10:11:14 +00:00
nickysn
ccf5aaeebb + enable the ELF32 reader in unit exeinfo for i8086-msdos
git-svn-id: trunk@39031 -
2018-05-20 10:01:19 +00:00
nickysn
537fbefb9e * add texeheader.ImgOffset to all file offsets when reading an ELF file. This
will be useful for reading i8086-msdos dwarf debug info, because it is
  appended after the regular dos MZ exe in an ELF32 image by the watcom linker.

git-svn-id: trunk@39030 -
2018-05-20 09:43:08 +00:00
nickysn
3bcd21663e * replaced nested ifdefs in unit exeinfo with a chain of {$if defined(...)} ...
{$elseif defined(...)}

git-svn-id: trunk@39027 -
2018-05-19 21:04:30 +00:00
Károly Balogh
4002833001 morphos: also enable the elf32 loader in exeinfo for morphos
git-svn-id: trunk@36805 -
2017-07-28 12:20:40 +00:00
Károly Balogh
ac19b0eae6 morphos: enabling lineinfo unit
git-svn-id: trunk@36804 -
2017-07-27 22:31:19 +00:00
svenbarth
00e9289f58 * envp is part of sysunixh, so no need to manually import it using an external
git-svn-id: trunk@36685 -
2017-07-08 19:15:54 +00:00
michael
011a88b1fe * Remove mode objfpc (bug ID 31629)
git-svn-id: trunk@35886 -
2017-04-22 08:53:13 +00:00
pierre
dcd349abd9 Use DEBUG_LINEINFO instead of DEBUG in exeinfo unit source
git-svn-id: trunk@34521 -
2016-09-13 08:37:52 +00:00
pierre
1612138071 Use $checkpointer off to avoid calls to CheckPointer function if -gc option is used
git-svn-id: trunk@34384 -
2016-08-28 15:59:36 +00:00
pierre
57f2df1f62 * Remove sysutils in _USES clause, to avoid exception handling importation,
especially when exeinfo unit is implicitly loaded when -gl compilation option
  is used.
  + LocalError, new ExitProc procedure, used to catch any error that could happen
  inside GetExeInMemoryBaseAddr procedure.
  * Use SetJmp/LongJmp instead of Try/except in GetExeInMemoryBaseAddr function,
  together with local change and restoration of ExitProc.

git-svn-id: trunk@33561 -
2016-04-27 13:13:31 +00:00
pierre
3de617c79e Fix phdr pointer increment and use envp variable from system unit for Solaris operating system
git-svn-id: trunk@33008 -
2016-01-27 10:47:16 +00:00
pierre
90359bcb3c Add code to find base address in unix ELF aux vector above enviroment in startup stack
git-svn-id: trunk@33007 -
2016-01-26 14:44:31 +00:00
yury
7688639a10 * Return a real base address for ELF executables by GetModuleByAddr() instead of hard-coded 0.
* Obtain a real processaddress for ELF images by OpenExeFile() instead of hard-coded 0.
* It fixes line info information for Position Independent Executables (PIE).

git-svn-id: trunk@32052 -
2015-10-13 20:08:03 +00:00
florian
d0f4e7cc99 * respect feature defines
git-svn-id: trunk@30378 -
2015-03-29 19:43:25 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
Jonas Maebe
e6c812a60a * assume unicode in case of FPC_OS_UNICODE instead of only for WinCE
git-svn-id: branches/cpstrrtl@24959 -
2013-06-24 09:39:57 +00:00
yury
d26f0552a0 * Sync with trunk r23404.
* Regenerated makefiles.

git-svn-id: branches/targetandroid@23405 -
2013-01-16 13:21:51 +00:00
yury
1e78337015 * Oops, wrong commit r23235. Reverted. Now correct: Fixed lineinfo for Android.
git-svn-id: branches/targetandroid@23236 -
2012-12-28 10:42:27 +00:00
sergei
47cd83ae14 * Fetch PECOFF section sizes correctly (not including zero padding), resolves #22788.
git-svn-id: trunk@22879 -
2012-10-30 09:00:13 +00:00
pierre
afaea929a1 * Also enable ELF32 or ELF64 for OpenBSD OS
git-svn-id: trunk@21004 -
2012-04-23 10:10:10 +00:00
Tomas Hajny
5d82eaa628 * fix buggy stabs offset calculation
git-svn-id: trunk@20144 -
2012-01-21 20:43:03 +00:00
pierre
ceffd8b8cc * Fix lineinfo problems for BeOS/Haiku
git-svn-id: trunk@19760 -
2011-12-05 16:29:43 +00:00
armin
fc45960024 updated for netware target
git-svn-id: trunk@17193 -
2011-03-27 15:11:43 +00:00
Jonas Maebe
fdfb21387f * fixed potential buffer overflow errors (reported by Stian Skjelstad,
mantis #17922)

git-svn-id: trunk@16343 -
2010-11-14 11:59:24 +00:00
Jonas Maebe
79fbca8c63 * don't crash when reading a Macho-O binary with an unanticipated
structure (patch by Colin Western, mantis #17424)

git-svn-id: trunk@15995 -
2010-09-16 13:55:30 +00:00
yury
628b0c23ac * exeinfo: Return executable image base and current module base address on Windows.
* exeinfo: Properly handle long COFF section names. Bug #13499.
* lineinfo, lnfodwrf: Properly use executable image base and current module base address.

git-svn-id: trunk@13145 -
2009-05-15 22:14:09 +00:00
florian
8a940151a7 o patch by Sergej Gorelkin:
* When OpenExeFile is called with an empty filename argument, 
    it apparently opens stdin and crashes immediately thereafter trying to seek in non-seekable stream. 
    The filename is empty whenever GetLineInfo is called with the address that does not belong to valid module.

git-svn-id: trunk@12802 -
2009-02-26 18:34:48 +00:00
florian
67fbadcdcf * WinCE compilation fixed
git-svn-id: trunk@11057 -
2008-05-23 15:35:18 +00:00
florian
873409cd3c * baseaddr must be nil on windows
git-svn-id: trunk@11030 -
2008-05-21 20:45:20 +00:00
florian
d955c9b4f7 + proper handling of lineinfo retrival for dyn. libs in unix
git-svn-id: trunk@11010 -
2008-05-18 18:42:09 +00:00
florian
96f8576bf2 * handle lineinfo in dlls correctly, resolves #4171 and #10797 for windows
git-svn-id: trunk@11004 -
2008-05-18 16:46:17 +00:00
Tomas Hajny
203e19782f * use the provided constant instead of hardcoded value
git-svn-id: trunk@10758 -
2008-04-22 14:42:48 +00:00
yury
b64519162d * Fixed warning.
git-svn-id: trunk@10724 -
2008-04-19 21:31:46 +00:00
Tomas Hajny
a4a1999e4f * fix broken offsets and improve reliability on GO32v2, mostly based on input by Robert Riebisch
git-svn-id: trunk@10682 -
2008-04-17 05:21:14 +00:00
Jonas Maebe
521b5d88ff * fixed FindSectionMachO32PPC() return value
git-svn-id: trunk@10248 -
2008-02-08 14:06:31 +00:00
Jonas Maebe
4b82b9b50e * set FunctionRelative to false for Mach-O so -gl works again
for stabs

git-svn-id: trunk@10202 -
2008-02-04 10:45:35 +00:00
peter
cc710dc05f * remove objpas dependency, patch by Giulio
git-svn-id: trunk@10154 -
2008-02-02 16:16:21 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04:56 +00:00
peter
545d27e888 * go32v2 fixed
* moved all targets using the same executbale structure together so
    the reuse of the generic functions is more clear

git-svn-id: trunk@9881 -
2008-01-23 15:59:20 +00:00
peter
73871b64ce * BeOS/Haiku updates from Olivier Coursière
git-svn-id: trunk@9880 -
2008-01-23 15:37:25 +00:00
peter
482ad1334b * support .gnu_debuglink section to have the debug info in an
external file

git-svn-id: trunk@9813 -
2008-01-20 13:13:55 +00:00
florian
f7a891248a * win64 compilation fix
git-svn-id: trunk@9812 -
2008-01-20 13:04:21 +00:00
Tomas Hajny
03de80785d * StabsFunctionRelative initialization hopefully fixed
git-svn-id: trunk@9810 -
2008-01-20 12:12:01 +00:00
Tomas Hajny
51b230d501 * one more change from FileSize (F) to E.Size, although it's in not yet adapted BEOS section
git-svn-id: trunk@9808 -
2008-01-20 12:06:28 +00:00
Tomas Hajny
8c9099b5e5 * E.Size changed to int64 for consistency with FileSize result
git-svn-id: trunk@9807 -
2008-01-20 11:57:47 +00:00
Tomas Hajny
00b342301a * partial fix for Win64 (CoffSymbol not resolved yet - is it equal in PE32 and PE32PLUS?)
git-svn-id: trunk@9806 -
2008-01-20 11:49:41 +00:00
Jonas Maebe
c743711f40 * fixed darwin/stabs code
git-svn-id: trunk@9805 -
2008-01-20 11:26:31 +00:00