[M3devel] link info still bad.
Jay
jayk123 at hotmail.com
Sat Jan 19 15:33:08 CET 2008
clarification -- RTLinker still crashes. I put in C code to dump, since it crashes before its own printing would work.A bunch works and then:
Module 00682020 ..\src\runtime\common\RTHeapInfo.m3 Imports 006820C0{Import 00000000, Binder 00000000, Next 00603FD0}
and then the dumper AV's because the next pointer is bad.
0:000> dc 00603FD000603fd0 8be58955 c0b80845 c900682a 909090c3 U...E...*h......00603fe0 8be58955 80b80845 c900682b e58955c3 U...E...+h...U..00603ff0 ec835657 08458b20 8904c083 2be8a1c2 WV.. .E........+00604000 f4050068 8b000000 dc7d8d00 b8fcc689 h.........}.....00604010 00000007 a5f3c189 758dd789 07b8fcdc ...........u....00604020 89000000 83a5f3c1 5f5e20c4 9090c3c9 ......... ^_....00604030 8be58955 60b80845 c900682c 909090c3 U...E..`,h......00604040 8be58955 00b80845 c900682d 909090c3 U...E...-h......
anything over 0x80000000, or depending on configuration, 0xc0000000, is an invalid user mode pointer on 32bit NT.
The address space is usually split 2gig/2gig, the upper 2gig is the kernel memory, the same mappings system side.
There is an option to make it 3gig/1gig.
If anyone has any hints, please tell me, thanks.
If anyone else can build this stuff...?
I can commit the printing to be only on this platform...
The assembly code output by cm3cg is much harder to read than it should be, even for assembly language.. :(
Attached.
- Jay
From: jayk123 at hotmail.comTo: m3devel at elegosoft.comSubject: RE: [M3devel] more assembly symbols please?Date: Sat, 19 Jan 2008 11:32:21 +0000
duh, finally, got it. parameters being passed in the wrong order -- left to right instead of right to left.should have read the assembly of some multi parameter function calls... PROCEDURE RTLinker_PutInt (i: INTEGER; width := 0) = VAR num : ARRAY [0..30] OF CHAR; len := FromInt (ADR (num[0]), i, 10); BEGIN FOR i := 1 TO width - len DO PutChar (' ') END; PutChars (ADR (num[0]), len); END RTLinker_PutInt;Dump of assembler code for function RTLinker__RTLinker_PutInt:0x005de25f <RTLinker__RTLinker_PutInt+0>: push %ebp0x005de260 <RTLinker__RTLinker_PutInt+1>: mov %esp,%ebp0x005de262 <RTLinker__RTLinker_PutInt+3>: sub $0x38,%esp0x005de265 <RTLinker__RTLinker_PutInt+6>: mov 0x8(%ebp),%edx0x005de268 <RTLinker__RTLinker_PutInt+9>: sub $0x4,%esp0x005de26b <RTLinker__RTLinker_PutInt+12>: lea 0xffffffd9(%ebp),%eax0x005de26e <RTLinker__RTLinker_PutInt+15>: push %eax0x005de26f <RTLinker__RTLinker_PutInt+16>: push %edx0x005de270 <RTLinker__RTLinker_PutInt+17>: push $0xa0x005de272 <RTLinker__RTLinker_PutInt+19>: call 0x5de345 <RTLinker__FromInt> and I AVed writing to the address 0xA.. - Jay
Connect and share in new ways with Windows Live. Get it now!
_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080119/b0b408e7/attachment-0002.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: RTHeapIn.ms
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080119/b0b408e7/attachment-0002.ksh>
More information about the M3devel
mailing list