Commit Graph

53694 Commits

Author SHA1 Message Date
nickysn
4aa66d9033 * emit a 32-bit offset for DW_FORM_ref_addr on i8086 (Watcom compatibility)
git-svn-id: trunk@39077 -
2018-05-21 01:36:23 +00:00
nickysn
2a5fbd4598 * continue reading the segment when walking the dwarf arange tuples on i8086
git-svn-id: trunk@39076 -
2018-05-20 22:51:52 +00:00
nickysn
d1cdd8be7c * do not emit padding bytes after the dwarf arange header on i8086 for
compatibility with Open Watcom (also, the dwarf spec is not very clear about
  the alignment requirements on segmented architectures, so that's why we do
  this by default, instead of putting it behind a -go debug switch)

git-svn-id: trunk@39075 -
2018-05-20 22:50:46 +00:00
nickysn
1a2f364e68 * use 32-bit address_size in the dwarf arange sections on i8086 (for Open Watcom
compatibility)

git-svn-id: trunk@39074 -
2018-05-20 21:59:32 +00:00
nickysn
0efb86518b + emit dwarf segment information on i8086 in the .debug_aranges section
git-svn-id: trunk@39073 -
2018-05-20 21:28:26 +00:00
nickysn
651571c00f + added comments, indicating where we emit the address_size and segment_size
fields of the dwarf arange header

git-svn-id: trunk@39072 -
2018-05-20 21:21:26 +00:00
nickysn
a12622e06f * use 1-byte alignment instead of 4-byte alignment for the OMF dwarf sections
(otherwise the alignment screws up the dwarf debug info)

git-svn-id: trunk@39071 -
2018-05-20 20:59:39 +00:00
nickysn
6fedf7e930 + debug dump the address size from the header in ParseCompilationUnitForFunctionName
git-svn-id: trunk@39070 -
2018-05-20 20:41:13 +00:00
nickysn
a598e17c8a * fix loading of i8086-msdos ELF when the MZ binary in front of it exceeds 64kb
git-svn-id: trunk@39069 -
2018-05-20 20:18:00 +00:00
nickysn
2955ee2dc4 + i8086-msdos implementation of exeinfo.GetModuleByAddr
git-svn-id: trunk@39068 -
2018-05-20 20:03:58 +00:00
nickysn
1d3ad2b078 + also take the segment portion of the address in lnfodwrf.ParseCompilationUnit
git-svn-id: trunk@39067 -
2018-05-20 17:20:29 +00:00
nickysn
4ce5db5188 + also check the arange segment in ParseCompilationUnitForDebugInfoOffset
git-svn-id: trunk@39066 -
2018-05-20 17:00:56 +00:00
marco
dcfe1cae13 * fix 4265 cases where the index resolved a lemma that had a link= property.
Mantis #32325
 * adds a warning for the cases that are fixed. If generation logs are saved, this makes it easy to check if new problems are related to this fix.

git-svn-id: trunk@39065 -
2018-05-20 16:59:45 +00:00
nickysn
81d5483ab1 * subtract the process load segment from the code segment on i8086
git-svn-id: trunk@39064 -
2018-05-20 16:55:18 +00:00
nickysn
875330d84f + pass a segment (0 on non-i8086) to all ParseCompilationUnit* functions in unit
lnfodwrf

git-svn-id: trunk@39063 -
2018-05-20 16:51:49 +00:00
nickysn
d7a3f755e4 + also read arange segments on i8086
git-svn-id: trunk@39062 -
2018-05-20 16:07:28 +00:00
marco
d7f2ab0d28 * fix resolve* functions for filesystems with backslashes.
git-svn-id: trunk@39061 -
2018-05-20 16:03:30 +00:00
nickysn
3989e57fed * take into account the address size in lnfodwrf.ReadAddress on i8086; support
2-byte and 4-byte addresses

git-svn-id: trunk@39060 -
2018-05-20 15:48:58 +00:00
nickysn
a7f5a69000 + added an address size parameter to lnfodrwf.ReadAddress(); pass the expected
address size, as taken from the dwarf header structure

git-svn-id: trunk@39059 -
2018-05-20 15:43:19 +00:00
nickysn
dc8b78abe6 + debug print the arange address and segment sizes
git-svn-id: trunk@39058 -
2018-05-20 14:58:09 +00:00
nickysn
1f76f52996 * use hexstr(addr) in the dwarf backtrace function, so it displays always a good
value, according to the x86 pointer type

git-svn-id: trunk@39057 -
2018-05-20 14:42:17 +00:00
nickysn
96b53c168c * use hexstr(baseaddr) to print out the pointer value, regardless of its x86 type (near/far, etc.)
git-svn-id: trunk@39056 -
2018-05-20 14:39:28 +00:00
nickysn
abe61d0daa * the 'addr' and 'baseaddr' parameters of exeinfo.GetModuleByAddr changed to
far pointers on i8086
* the 'addr' parameter of lnfodwrf.OpenDwarf changed to codepointer

git-svn-id: trunk@39055 -
2018-05-20 14:33:17 +00:00
nickysn
443980b7ac * moved the morphos code for exeinfo.GetModuleByAddr to a separate ifdef section
git-svn-id: trunk@39054 -
2018-05-20 14:09:57 +00:00
nickysn
0ceb1244bf * changed the type of the first parameter ('addr') of lnfodwrf.GetLineInfo to
CodePtrUInt instead of PtrUInt

git-svn-id: trunk@39053 -
2018-05-20 13:41:10 +00:00
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
marco
f401410500 * quick fix for uninitialized "CodeEl" usage that trips up small test programs
git-svn-id: trunk@39051 -
2018-05-20 13:06:13 +00:00
nickysn
2411cb3f24 * fix save/restore of base/index/pos on i8086
git-svn-id: trunk@39050 -
2018-05-20 12:55:22 +00:00
nickysn
0ca05f042b + parse the openwatcom dwarf extension DW_LNE_SET_SEGMENT and also track segment
data in the dwarf state machine on i8086

git-svn-id: trunk@39049 -
2018-05-20 12:43:53 +00:00
nickysn
b048da4284 + added the non-standard Open Watcom DWARF extension DW_LNE_set_segment extended
opcode constant; not emitted yet; will be needed on i8086

git-svn-id: trunk@39048 -
2018-05-20 12:25:03 +00:00
nickysn
60d49d696a * fix for ReadLEB128 on 16-bit CPUs
git-svn-id: trunk@39047 -
2018-05-20 12:06:36 +00:00
nickysn
994783db95 + introduce the TFilePos type for storing file offsets; use longint instead of
sizeint on i8086, because sizeint is 16-bit and file offsets are 32-bit there

git-svn-id: trunk@39046 -
2018-05-20 11:55:47 +00:00
svenbarth
dcdb151add * prohibit static array constants inside dynamic array constants for Delphi modes
+ added test

git-svn-id: trunk@39045 -
2018-05-20 11:50:27 +00:00
svenbarth
31a9ed573c * regenerate msg* files after addition of the new message for static array constants inside dynamic array
constants

git-svn-id: trunk@39044 -
2018-05-20 11:50:24 +00:00
svenbarth
74ca92b5dc + add a message that will be used to complain about static array constants inside dynamic array constants for
Delphi modes

git-svn-id: trunk@39043 -
2018-05-20 11:50:21 +00:00
svenbarth
a29a6abc55 + add support for Delphi's dynamic array constant syntax ("[...]") in Delphi modes
git-svn-id: trunk@39042 -
2018-05-20 11:50:19 +00:00
svenbarth
08dd4e5445 + add support for dynamic array constants
+ added test

git-svn-id: trunk@39041 -
2018-05-20 11:50:16 +00:00
svenbarth
2bf5c28077 + add methods begin_dynarray_const and end_dynarray_const which can be used to emit the data of a dynamic array
inbetween
+ add method emit_dynarray_offset to emit a reference to that data with the correct offset

git-svn-id: trunk@39040 -
2018-05-20 11:50:13 +00:00
svenbarth
e863245021 + add method get_dynarray_symofs to retrieve the platform specific offset of the dynamic array data from its
meta data record

git-svn-id: trunk@39039 -
2018-05-20 11:50:11 +00:00
svenbarth
d3d9221c8d + add method get_dynarray_header_size to retrieve the size of the dynamic array meta data record
git-svn-id: trunk@39038 -
2018-05-20 11:50:09 +00:00
svenbarth
8606293028 * assume that dynamic arrays with a negative reference count are immutable (at least regarding their metadata)
git-svn-id: trunk@39037 -
2018-05-20 11:50:06 +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
db3c88c871 + enabled compilation of unit lnfodwrf on i8086-msdos
- disabled compilation of unit lineinfo on i8086-msdos (no stabs support on this target)

git-svn-id: trunk@39035 -
2018-05-20 11:25:27 +00:00
Mattias Gaertner
763fd783e0 pastojs: typecast array to/from tjsobject
git-svn-id: trunk@39034 -
2018-05-20 10:40:07 +00:00
nickysn
8364b1f4ca * changed the result of function Pos() to SizeInt (same type as the 'index'
variable it returns). Fixes the register allocation failure error when
  compiling on i8086.

git-svn-id: trunk@39033 -
2018-05-20 10:40:00 +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
Mattias Gaertner
3d186b2706 pastojs: for value in externalarray do
git-svn-id: trunk@39026 -
2018-05-19 17:59:50 +00:00