summaryrefslogtreecommitdiff
path: root/src/pal
AgeCommit message (Collapse)AuthorFilesLines
2015-04-23Fix loading of PAL on OSXMatt Ellis1-0/+7
On OSX our trick to preload the PAL from the host before trying to load coreclr doesn't actually cause the OSX loader to correctly resolve the dependency. This change moves to use rpath and then add an entry to the rpath list for libcoreclr to @loader_path. This way, we can load libcoreclr even in cases where the path to the PAL is not on DYLD_LIBRARY_PATH and your CWD is not the doesn't have a copy. Related issues are #709 and #719
2015-04-23Addressing PR feedback in the test cases and fixing casing for test case runsJonathan Miller2-2/+5
2015-04-23Merge pull request #789 from mikem8361/dactablefixMike McLaughlin2-30/+30
Fixed the dac table file problem
2015-04-23Fixed the dac table file problem. The file name used isn't unique if there ↵Mike McLaughlin2-30/+30
is more than one process running managed code. As a temporary fix (using a file is very temporary anyway), use the CLR module base address in the file name. Even if there is more than one process with managed code/coreclr running if the base address is the same the dac table address will be the same. Moved the dac table initialization to be sooner in the EE initialization because SOS/DAC can need it even before the EE debugger support is started. Also fixed the dac table file cleanup. We can't actually remove the dac file now that the base address is part of the name because multiple processes could be using it.
2015-04-23Merge pull request #773 from janhenke/build-argsMatthew Whilden2-28/+25
Add optional arguments for choosing clang version and verbose build output
2015-04-22Changed the VM's hardware exception to return if not in manged code. For ↵Mike McLaughlin9-122/+190
DAC's hardware exception handling, add hardware exception holder used to determine if a C++ exception should be thrown for a hardware exception. Cleaned up PAL initialization interactions between the debugger modules (PAL_InitializeDLL) and coreclr (PAL_InitializeCoreCLR).
2015-04-22Addressing PR feedbackJonathan Miller1-64/+51
2015-04-22Fixing an issue in FILECanonicalizePath where paths like /Test/..Jonathan Miller6-1/+136
would not be properly canonicalized due to a missing check to ensure the function doesn't truncate the root slash
2015-04-22Add optional arguments for choosing clang version and verbose build outputJan Henke2-28/+25
This commit adds two optional arguments to build.sh. The "verbose" option enables verbose build output. This can be useful to debug build failures by seeing the complete command line used to invoke the build. The other option is "clangx.y", which allows to specify the clang version used for the build. This makes it easy to test different clang versions and aid future migration to newer clang releases and other platforms. Closes #740
2015-04-22Add few pal APIs needed for debugger code.Prem Ramanathan11-0/+280
Added APIs: InterlockedBitTestAndReset InterlockedBitTestAndSet InitializeCriticalSectionEx Added test for the first two APIs.
2015-04-21Fixed locating llvm tools on fedoraDick van den Brink1-2/+2
The locate_llvm_exec function was missing the $llvm_prefix
2015-04-19Merge pull request #736 from ellismg/hardcode-utf8-in-palMatt Ellis6-740/+19
Hardcode CP_ACP to UTF-8 on Linux
2015-04-18Merge pull request #733 from stephentoub/temp_pathJan Vorlicek4-234/+194
Make GetTempPathA/W first check TMPDIR
2015-04-17Merge pull request #737 from janvorli/fix-div-overflow-exceptionJan Kotas1-120/+0
Ensure we differentiate between division by zero and overflow
2015-04-18Ensure we differentiate between division by zero and overflowJan Vorlicek1-120/+0
This change implements parsing of the IDIV instruction operand so that we can find whether an integer division error was a division by zero or an integer overflow. It replaces the previous functionality that was implemented for OSX only and was incomplete (it didn't handle memory operands) and partially incorrect (not handling R8..R15 properly).
2015-04-17Simplify a bit of logic in GetTempPathAStephen Toub1-15/+14
2015-04-17Hardcode CP_ACP to UTF-8 on LinuxMatt Ellis6-740/+19
Previously, on Linux, the PAL would attempt to detect the current codepage via setlocale and maintained a mapping from LC_TYPES to Win32 locale names. On OSX, we didn't do any of this, instead we always used UTF-8 as the current codepage. This change moves to this model on Linux as well, something we want to do because it will enable us to use Ansi marshalling during PInvoke to marshall UTF-8 data to native code (which is common when interoping with existing native libraries on Linux) and allows us to remove a bunch of code we don't want to carry forward from the PAL.
2015-04-17Merge pull request #730 from josteink/freebsd-linkingSergiy Kuryata1-0/+11
CoreClr: Fix FreeBSD linking-issues.
2015-04-17Fix up final FPU-registers for FreeBSD x86_64.Jostein Kjønigsen1-5/+1
FreeBSD now builds without compilation errors. For FreeBSD and glory! , , /( )` \ \___ / | /- _ `-/ ' (/\/ \ \ /\ / / | ` \ O O ) / | `-^--'`< ' (_.) _ ) / `.___/` / `-----' / <----. __ / __ \ <----|====O)))==) \) /==== <----' `--' `.__,' \ | | \ / /\ ______( (_ / \______/ ,' ,-----' | `--{__________) This closes https://github.com/dotnet/coreclr/issues/594#issuecomment-93995183
2015-04-17Make GetTempPathA/W first check TMPDIRStephen Toub4-234/+195
Today GetTempPathA/W are hardcoded to return /tmp/. This commit makes them first consult the TMPDIR environment variable, using its value if it exists. This also overhauls the tests for GetTempPathA/W, which were out-of-date with regards to the existing implementation and which were excluded from PAL test runs.
2015-04-17CoreClr: Fix FreeBSD linking-issues.Jostein Kjønigsen1-0/+11
This fix brings the build almost up to 100% (from 35%), where it fails due to PIC-errors.
2015-04-16Merge pull request #726 from janvorli/fix-copyright-headersJan Kotas1-0/+5
Add missing MIT license headers
2015-04-17Add missing MIT license headersJan Vorlicek1-0/+5
.rc and .def files were missing the MIT license headers, so this change adds them.
2015-04-16Merge pull request #691 from josteink/freebsd-threadingJan Vorlicek3-5/+25
PAL: Fix threading on FreeBSD.
2015-04-16PAL: Fix threading on FreeBSD.Jostein Kjønigsen3-5/+25
2015-04-16Cleanup safecrt in PALJan Vorlicek5-3647/+7
The safecrt code in PAL was heavily sprinkled with #ifdefs for POSITIONAL_PARAMETERS (that we never define) and _SAFECRT_IMPL (which is always defined in the PAL code). This change cleans that up by removing checks of those ifdefs. Also, I've found that the src/pal/src/safecrt/crtdefs.h is not used anywhere, so I am removing it as well.
2015-04-16Merge pull request #715 from janvorli/remove-long-doubleJan Vorlicek3-186/+38
Remove long double support from safecrt routines in PAL
2015-04-16Remove long double support from safecrt routines in PALJan Vorlicek3-186/+38
This change removes the long double support from the safecrt printf style routines in PAL. The existing support was effectively disabled anyways, we didn't have similar support in the non-safe printf style functions and coreclr has no need to print long doubles.
2015-04-14Rename "CoreClrPal" to "coreclrpal"Matt Ellis1025-2102/+2102
Simply change the case of the library the PAL lives in so that is all lowercase.
2015-04-14Create shared PAL module and change all the debugger modules and coreclr to ↵Mike McLaughlin2-9/+19
use it.
2015-04-10Update prebuilt ETW headersJan Kotas3-14/+319
2015-04-09Merge pull request #647 from josteink/bsd_fpregsSergiy Kuryata1-0/+19
PAL: Preliminary work on FPU/SSE-registers for FreeBSD x86_64.
2015-04-09Merge pull request #675 from janvorli/remove-timezone-from-palSergiy Kuryata35-1665/+0
Remove timezone usage from PAL
2015-04-09Merge pull request #669 from josteink/freebsd-fixesJan Vorlicek2-5/+17
Fix various FreeBSD build-breakers.
2015-04-09Remove timezone usage from PALJan Vorlicek35-1665/+0
This change removes all references to the timezone variable, all the functions that transitively depended on it from PAL and all the related tests. None of these was used outside of PAL and the tests.
2015-04-09Various FreeBSD fixes.Jostein Kjønigsen2-5/+17
2015-04-09Preliminary work on FPU/SSE-registers for FreeBSD x86_64.Jostein Kjønigsen1-0/+19
This partially addresses https://github.com/dotnet/coreclr/issues/594
2015-04-08Use new asm implementation of RtlRestoreContext for EE/debugger on POSIX systemEugene Zemtsov1-33/+5
2015-04-09Merge pull request #668 from janvorli/rtl-restore-context-asmJan Vorlicek3-37/+100
Implement RtlRestoreContext in asm
2015-04-08Implement RtlRestoreContext in asmJan Vorlicek3-37/+100
This change implements the RtlRestoreContext in asm to get consistent and reliable behavior on all platforms.
2015-04-08Refactor context register access in seh-unwind.cppJan Vorlicek3-201/+207
This change refactors the native context register access to use the MCREG_xxx macros so that it can compile on FreeBSD too.
2015-04-08Merge pull request #634 from josteink/exceptionsJan Vorlicek1-2/+2
Make FreeBSD handle exceptions like Linux.
2015-04-07PAL: Use /usr/local/include for includes on FreeBSD.Jostein Kjønigsen1-0/+5
2015-04-05Make FreeBSD handle exceptions like Linux.Jostein Kjønigsen1-2/+2
Addresses https://github.com/dotnet/coreclr/issues/626 .
2015-04-03Merge pull request #621 from Djuffin/dbi-linuxEugene Zemtsov1-1/+32
Make managed debugging on Linux possible
2015-04-03Merge pull request #627 from josteink/ptrace-freebsdSergiy Kuryata1-5/+21
Fix configuration of ptrace on FreeBSD.
2015-04-03Fix configuration of ptrace on FreeBSD.Jostein Kjønigsen1-5/+21
This closes https://github.com/dotnet/coreclr/issues/625
2015-04-03Detect clang35 on FreeBSD.Jostein Kjønigsen1-0/+4
clang-3.5 is required to build correctly, but is not detected on FreeBSD where it is aliased as clang35 and clang++35, not clang-3.5 and clang++-3.5. This closes https://github.com/dotnet/coreclr/issues/615
2015-04-02Get the dbgshim module to build and enabled all the public APIs with ↵Mike McLaughlin1-11/+11
simple/dummy implementation for Linux. Rename CMakeLists.txt file.
2015-04-02Make managed debugging on Linux possible (attach, load, bp, exceptions, ↵Eugene Zemtsov1-1/+32
stacktrace) Fixes that were required to achieve that 1. Funnel SIGTRAP into EE debugger. 2. Making that memory allocated by EE debugger is executable. 3. Disable metadata reading optimizations which are not working on Linux. 4. Workaround RtlRestoreContext not properly working with EFlags. 5. Avoid calls to ShimRemoteDataTarget.GetContext on Linux, it is not implemented and not needed for pure managed debugging. 6. Adjust IP value after breakpoint SIGTRAP to meet debuggers expectations.