Timo Kreuzer
fcc5b3bfbf
Move asmmacro.h to ndk, cause we need it outside of ntoskrnl, too.
...
svn path=/branches/ros-amd64-bringup/; revision=37472
2008-11-19 21:51:34 +00:00
Timo Kreuzer
a0de230f73
Some asm macros for x64. They allow creating unwind info in a MASM like way, As a general rule for all asm functions changing the stack pointer, use ".proc FunctionName" (without '_' prefix) before the function and ".endproc" after the function and use .allocstack, .pushreg, etc. after the corresponding opcode.
...
svn path=/branches/ros-amd64-bringup/; revision=37469
2008-11-19 21:24:52 +00:00
Timo Kreuzer
4a08b236bd
- use (unsigned) long instead of ULONG
...
- add DW_CFA_offset_extended_sf
svn path=/branches/ros-amd64-bringup/; revision=37462
2008-11-19 19:03:40 +00:00
Timo Kreuzer
7ea9dd6a28
- Fix several ULONG/ULONG_PTR issues
...
- Add a parameter to DefaultQueryInfoBufferCheck for ULONG_PTR/SIZE_T ResultLength
svn path=/branches/ros-amd64-bringup/; revision=37435
2008-11-18 03:41:21 +00:00
Timo Kreuzer
ca24ca153b
ETHREAD.TopLevelIrp is ULONG_PTR, not ULONG
...
svn path=/branches/ros-amd64-bringup/; revision=37434
2008-11-18 03:01:31 +00:00
Timo Kreuzer
6918fdc238
fix InterlockedExchangePointer usage
...
svn path=/branches/ros-amd64-bringup/; revision=37433
2008-11-18 02:40:51 +00:00
Timo Kreuzer
0460be46a7
fix a typo
...
svn path=/branches/ros-amd64-bringup/; revision=37432
2008-11-18 02:31:40 +00:00
Timo Kreuzer
39f948a7a4
forgot this file
...
svn path=/branches/ros-amd64-bringup/; revision=37431
2008-11-18 02:27:04 +00:00
Timo Kreuzer
eda691f786
cleanup ntoskrnl.exe:
...
- Move the last stubs into better places
- implement KeQueryActiveProcessors, KeInvalidateAllCaches, KeGetRecommendedSharedDataAlignment, KeSaveStateForHibernate, KeSetDmaIoCoherency, PsGetContext, PsSetContext based on x86 implementations.
- remove KdbpGetCommandLine from kd.c where it wasn't supposed to be
- remove amd64stubs.c
svn path=/branches/ros-amd64-bringup/; revision=37430
2008-11-18 02:25:41 +00:00
Timo Kreuzer
6496939b20
update amd64subs.c
...
svn path=/branches/ros-amd64-bringup/; revision=37429
2008-11-18 00:41:47 +00:00
Timo Kreuzer
682555b37e
RtlWalkFrameChain:
...
- stop when we leave the stack or Rip gets 0
svn path=/branches/ros-amd64-bringup/; revision=37428
2008-11-18 00:39:39 +00:00
Timo Kreuzer
7df503962d
remove kernel32 dependency from mingw.rbuild
...
svn path=/branches/ros-amd64-bringup/; revision=37427
2008-11-18 00:32:20 +00:00
Timo Kreuzer
9726adc85e
"[00:08] Stefan100: 5) Alex_Ionescu will have your head"
...
Well, no risk, no fun... ;-)
Implement RtlpGetStackLimits
svn path=/branches/ros-amd64-bringup/; revision=37426
2008-11-18 00:31:22 +00:00
Timo Kreuzer
83991b3750
Implement RtlGetCallersAddress
...
svn path=/branches/ros-amd64-bringup/; revision=37425
2008-11-17 23:24:59 +00:00
Timo Kreuzer
ec5a72dda9
StackLimit < StackBase! Rename parameters in prototype of RtlpGetStackLimits to LowLimit and HighLimit.
...
svn path=/branches/ros-amd64-bringup/; revision=37424
2008-11-17 22:24:54 +00:00
Timo Kreuzer
cc2e388034
...and remove it from amd64stubs.c
...
svn path=/branches/ros-amd64-bringup/; revision=37420
2008-11-17 19:53:18 +00:00
Timo Kreuzer
48d69bb1fc
Add RtlUnwind stub to rtl...
...
svn path=/branches/ros-amd64-bringup/; revision=37419
2008-11-17 19:52:30 +00:00
Timo Kreuzer
f94841be68
Remove even more stubs
...
svn path=/branches/ros-amd64-bringup/; revision=37418
2008-11-17 19:48:00 +00:00
Timo Kreuzer
21dbc05113
remove more stubs
...
svn path=/branches/ros-amd64-bringup/; revision=37417
2008-11-17 19:26:58 +00:00
Timo Kreuzer
a2c562c00b
ntoskrnl:
...
- Use generic Interlocked functions for amd64, too
- use generic rbuild file (2 hax left)
- add baseaddress for ntoskrnl
- update and sort amd64stubs
svn path=/branches/ros-amd64-bringup/; revision=37410
2008-11-17 16:24:37 +00:00
Samuel Serapion
b89fdd3cc2
- Use TARGET_CPPFLAGS, needs latest ROSBE.
...
- Link crt runtime to dlls too.
svn path=/branches/ros-amd64-bringup/; revision=37392
2008-11-17 06:08:13 +00:00
Samuel Serapion
20092b5ba7
- call __main (C++ initialization) gcc inserts this call automatically for a function called "main", but not for "wmain" fixes explorer
...
- support pseudo runtime relocation v2.
- re-enable commented out code for security cookies.
- rename entry point __tmainCRTStartup.
- gccmain.c re-add comment explaining this file's purpose.
svn path=/branches/ros-amd64-bringup/; revision=37391
2008-11-17 05:51:18 +00:00
Timo Kreuzer
7a6bb9e3e7
RtlCaptureContext can throw an exception. As we need to push the flags on the stack, we need to create unwind info to make sure we can properly unwind. So instead of pushing the flags and then popping them back, push them on the stack at the beginning of the function, reference the location later, clean up the stack at the function end. Also add .cif_adjust_cfa_offset unwind op.
...
svn path=/branches/ros-amd64-bringup/; revision=37370
2008-11-15 01:21:50 +00:00
Samuel Serapion
da81081fc1
Kill auto-import insurgent.
...
svn path=/branches/ros-amd64-bringup/; revision=37354
2008-11-14 05:53:40 +00:00
Samuel Serapion
13ddfe0c4a
Kill auto-import insurgent.
...
svn path=/branches/ros-amd64-bringup/; revision=37353
2008-11-14 05:53:00 +00:00
Samuel Serapion
6043e97ff0
Correct definitions for WIN32 and WIN64.
...
svn path=/branches/ros-amd64-bringup/; revision=37352
2008-11-14 05:51:46 +00:00
Samuel Serapion
7ef39ab041
Declare war, shock and awe, and utterly defeat auto-import in one day.
...
svn path=/branches/ros-amd64-bringup/; revision=37351
2008-11-14 05:49:21 +00:00
Timo Kreuzer
31f36a74b1
Forgot this one
...
svn path=/branches/ros-amd64-bringup/; revision=37334
2008-11-13 04:54:47 +00:00
Timo Kreuzer
1bc69803f8
ULONG -> ULONG_PTR in KeRosDumpStackFrames
...
svn path=/branches/ros-amd64-bringup/; revision=37333
2008-11-13 04:48:07 +00:00
Timo Kreuzer
f391b2f222
Initial Implementations of RtlVirtualUnwind and RtlWalkFrameChain. They are not yet perfect, but unwinding works!
...
svn path=/branches/ros-amd64-bringup/; revision=37332
2008-11-13 04:17:53 +00:00
Timo Kreuzer
714e1a9b56
Remove RtlCaptureContext from stubs
...
svn path=/branches/ros-amd64-bringup/; revision=37331
2008-11-13 04:06:02 +00:00
Timo Kreuzer
fe2843026f
RtlCaptureContext:
...
- Don't safe the current rsp, but the one before calling the function.
- Try to optimize a bit by moving stuff around
svn path=/branches/ros-amd64-bringup/; revision=37330
2008-11-13 04:05:06 +00:00
Timo Kreuzer
1e2be3b9a7
Fix a bug in DeDecodeU/Sleb128, resulting in wrong allocation unwind codes. Add some debugging stuff.
...
svn path=/branches/ros-amd64-bringup/; revision=37329
2008-11-13 03:32:09 +00:00
Timo Kreuzer
e428d08732
- Implement RtlCaptureContext
...
- Reenable KeRosDumpStackFrames
svn path=/branches/ros-amd64-bringup/; revision=37324
2008-11-12 23:38:33 +00:00
Timo Kreuzer
88f62c6544
Add CONTEXT offsets to asm.h
...
svn path=/branches/ros-amd64-bringup/; revision=37323
2008-11-12 23:03:17 +00:00
Timo Kreuzer
71d1bca21f
Use PULONG instead of PSIZE_T in DefaultQueryInfoBufferCheck. Fixes 5 warnings, creates 1.
...
svn path=/branches/ros-amd64-bringup/; revision=37322
2008-11-12 23:02:22 +00:00
Timo Kreuzer
b5cbca16f7
Make sure we don't parse instructions beyond the eh_frame section. Looks like in some cases the last Fde isn't terminated with a 0 Length field.
...
svn path=/branches/ros-amd64-bringup/; revision=37320
2008-11-12 21:30:16 +00:00
Timo Kreuzer
f3668beb0c
Implement RtlLookupFunctionTable, RtlLookupFunctionEntry and a usermode/kernelmode version of RtlpLookupModuleBase helper function.
...
svn path=/branches/ros-amd64-bringup/; revision=37308
2008-11-12 15:24:40 +00:00
Timo Kreuzer
3005f566a0
Add UNWIND_HISTORY_TABLE_ENTRY and UNWIND_HISTORY_TABLE
...
svn path=/branches/ros-amd64-bringup/; revision=37307
2008-11-12 15:23:16 +00:00
Timo Kreuzer
9ae42204ec
Warn if a section doesn't fit into the ImageSize
...
svn path=/branches/ros-amd64-bringup/; revision=37306
2008-11-12 14:43:25 +00:00
Timo Kreuzer
7db1ae03ba
Oops, fix SizeOfImage
...
svn path=/branches/ros-amd64-bringup/; revision=37305
2008-11-12 14:39:46 +00:00
Timo Kreuzer
f1648ec5f2
Update SizeOfImage in PE header, fixes boot.
...
svn path=/branches/ros-amd64-bringup/; revision=37302
2008-11-12 12:30:19 +00:00
Samuel Serapion
e2f5a5dda0
Add the architecture to the iso name.
...
svn path=/branches/ros-amd64-bringup/; revision=37301
2008-11-12 09:22:54 +00:00
Timo Kreuzer
47c9fd4484
revert changes in reactos.dff
...
svn path=/branches/ros-amd64-bringup/; revision=37300
2008-11-12 05:30:34 +00:00
Timo Kreuzer
7ac869cef9
Also update ntoskrnl linkerflag.
...
svn path=/branches/ros-amd64-bringup/; revision=37294
2008-11-11 21:57:15 +00:00
Timo Kreuzer
3fdd600cf9
Add a linkerflag to make sure we get an .eh_frame section. Todo: Get it at the end of the executable, so we can safely remove it. Remove duplicate disable-stdcall-fixup
...
Fixes build.
svn path=/branches/ros-amd64-bringup/; revision=37293
2008-11-11 21:51:53 +00:00
Timo Kreuzer
3a5f46ce71
Implement rsym64.
...
This replaces rsym on x64 target. It parses the gcc generated DWARF2 unwind info and translates it into Windows compatible unwind info. Scope tables are not yet implemented.
This commit is dediated to kjk_hyperion
svn path=/branches/ros-amd64-bringup/; revision=37291
2008-11-11 19:51:30 +00:00
Samuel Serapion
e443742673
Don't randomly comment out code. Probably fixes kdb cont command.
...
svn path=/branches/ros-amd64-bringup/; revision=37288
2008-11-11 13:52:40 +00:00
Timo Kreuzer
520d8e7c94
give rsym it's own directory
...
svn path=/branches/ros-amd64-bringup/; revision=37282
2008-11-10 14:55:23 +00:00
Samuel Serapion
353e29a6a9
- Merge to trunk r37270.
...
- Modified rbuild files to conform to trunk.
- Added spec file for bzip2
- Covert user32 to use pspec and use it for WIN64 specific exports.
- Added liboldnames in rbuild, needed to fix explorer build.
- Comented out code in mingw startup lib that requires linking to kernel32 (mostly security cookie code, which is not used).
- Remove unneeded stubs from amd64stubs.c
- i386 builds again, explorer crashes, need to investigate further.
svn path=/branches/ros-amd64-bringup/; revision=37279
2008-11-10 13:52:28 +00:00