summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/Strike
AgeCommit message (Collapse)AuthorFilesLines
2017-09-07Make dumpmd work with tiered jitting. Now displays previous code addresses ↵David Mason1-14/+73
(#13805) * Make dumpmd work with tiered jitting. Now displays previous code addresses * add tier info and nativecodeversionnode ptr to dumpmd output * fix warnings on non-rejit platforms
2017-08-25Enable clrstack -f in ARM/LinuxJonghyun Park2-16/+24
2017-08-16Fixed Android AMD64 build. (#13402)Mike McLaughlin1-4/+4
2017-08-15Implement out of context stack unwinder (#13302)Mike McLaughlin1-11/+152
Implement out of context stack unwinder Decode the eh frame info found in the in-memory module image and pass it back to the remote libunwind8 to do the unwind. Added remote-unwind.cpp for all the out of context unwind code. Added an all managed threads option -all the "clrstack" (sos ClrStack). The IDebugDataTarget4 feature needs to be enabled for OS X. Add libunwind license notice to third party notices file.
2017-07-06Fix DumpLog to be compatible with CoreRT (#12636)Jan Kotas1-1/+1
2017-06-12[Arm64/Unix] Add 64K page support (#10981)Steve MacLean2-2/+7
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
2017-05-17Fix CreateDump-related undefined reference on non-AMD64/Linux platforms (#11635)Jonghyun Park2-5/+6
2017-05-03Createdump fixes and cleanup. (#11368)Mike McLaughlin2-1/+8
Fixed "with heap" option to actually include all the heaps. The way /proc/$pid/maps was parsed missed most of the RW data/heap regions. Added -u/--full full core dump options. Removed the useless m_memStatus variable in enummem.cpp.
2017-04-24Add "createdump" command to SOS. (#11161)Mike McLaughlin4-2/+94
Uses the createdump utility code as a library. Changed the "-m, --micro" option to "-t, --triage". Lots of cleanup.
2017-04-13Create ELF core dump on coreclr exceptions and signals. (#10902)Mike McLaughlin1-78/+1
* Create ELF core dump on coreclr exceptions and signals. When coreclr aborts because of a unhandled managed exception or hardware signal, the "createdump" utility is launched if the "COMPlus_DbgEnableMiniDump" environment variable is set to "1". This utility uses the DAC enumerate memory interface to determine what memory regions should be written for the managed state plus all the normal Linux memory regions for the native state like threads, stacks, DSO, etc. There still needs some to configure some of the "policies" like the name/location of the core dump and the type of minidump (MiniDumpNormal, MiniDumpWithFullAuxiliaryState, MiniDumpWithPrivateReadWriteMemory, etc.). Currently only supported on Ubuntu Linux. Make createdump smaller by using PAL in DAC module.
2017-02-24Merge pull request #9766 from discostu105/patch-1Stephen Toub1-1/+1
fix typo in sos_md.h
2017-02-24[Local GC] Move workstation GC DAC globals to a struct shared between GC and ↵Sean Gillespie1-5/+5
DAC (#9255) * [Local GC] Move workstation GC DAC globals to a struct shared between the GC and the DAC * (Some) code review feedback and bug fixes for issues found while debugging on OSX * Address some code review feedback: 1. Make g_gcDacGlobals a pointer and dacvar on the VM side, so that publishing the GC dac vars is done atomically (through a pointer assignment). This fixes a race that Noah noticed. 2. Remove the requirement for the GC's generation class struct to be known at compile-time, by using a dacvar as the size of the generation class at run-time (for pointer arithmetic) 3. Move all DAC-interesting fields to be at the start of GC internal classes, so that the DAC does not need to know the size or exact layout of the class past the fields it cares about. * Split the definition of the size of several arrays across the SOS/DAC and GC/DAC interfaces, and add static asserts that they are the same * Repair the Windows Release build * Implement the GC DAC scheme for Server GC and eliminate the duplicate GC dac vars * Some work * Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization * Actually make it work with server GC * Checkpoint * Checkpoint where everything works * Code cleanup * Fix debugger test failures * Additional code cleanup * Address code review feedback by adding a static assert and standardizing the way that we iterate over the generation table * Repair the Windows x86 build * Revert "Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization" This reverts commit 573f61a16b4fa8c2fc4c568c0b968a921230f31c. * Revert "Repair the Windows x86 build" This reverts commit 188c22d87e1d65abf00ab8fa28f46ad607a9028f. * Partial revert, move `generation_table` back the global namespace for a single-proc allocation helper * Fix a debugger test failure * Repair crash dump scenarios
2017-02-24fix typo in sos_md.hChristoph Neumüller1-1/+1
2017-02-12Remove remainder of FEATURE_CORECLR (tool missed some files, also comments)danmosemsft1-3/+1
2017-02-12Remove always defined FEATURE_EXCEPTIONDISPATCHINFOdanmosemsft1-2/+0
2017-02-11Revert "Remove always defined FEATURE_CORESYSTEM"danmosemsft1-0/+6
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
2017-02-11Revert "Remove more always defined FEATURE_CORESYSTEM"danmosemsft1-1/+2
This reverts commit 52009b8919ba55690f21cdc8f04e012a53eb8ef4.
2017-02-10Remove more always defined FEATURE_CORESYSTEMdanmosemsft1-2/+1
2017-02-10Redundant ASSERTE blocksdanmosemsft2-6/+0
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-3/+0
2017-02-10Remove always defined FEATURE_CORESYSTEMdanmosemsft1-6/+0
2017-02-09Rename __reserved to __clr_reserved to avoid a conflict on Android (#9402)Frederik Carlier1-7/+11
* Rename __reserved to __clr_reserved to avoid a conflict on Android
2017-02-01Fixes to make the lldb plugin work on ARM64 (#9216)Frederik Carlier1-8/+7
* Fixes to make the lldb plugin work on ARM64
2017-01-24Delete unused files (#9082)mikedn2-379/+0
- *.vrg files (registry entries) - *.ini files (performance counters) - *.vcproj/vcxproj/vspscc/sln (out of date) - mscorrc.rc2 (not referenced from anywhere)
2017-01-11Fix issue #8139 amd64 decoder bug. (#8901)Mike McLaughlin1-2/+2
Ignore modrm == 0 which ignores "inc dword ptr []" instructions. Also fixed minor EEHeap formatting bug on Linux.
2017-01-11[x86/Linux] Fix WIN64EXCEPTIONS build error (#8629)Jonghyun Park1-0/+1
* Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header This commit fixes #8342. * Use WIN64EXCEPTIONS instead of _TARGET_X86_ * Revise FaultingExceptionFrame This commit revises FaultingExceptionFrame to support WIN64EXCEPTIONS in x86/Linux port. * Add RUNTIME_FUNCTION__EndAddress as NYI * Revise regdisp.h * Revise eetwain.h * Comment out exinfo.cpp if WIN64EXCEPTIONS is defined * Revises excep.cpp * Fix mistmatch in ThrowControlForThread defintion * Revises cgenx86.cpp * Disable SEH-based exception handlers when WIN64EXCEPTIONS is defined * Revise stackwalk.cpp * Revise jitinterface.cpp * Revise readytorun.h * Revise dbgipcevents.h * Revise zapcode.cpp * Revise clrnt.h * Fix Windows build error * Mark FaultingExceptionFrame::UpdateRegDisplay as NYI * Revise per feedback * Revert #if defined(..) as #ifdef * Fix style changes * Fix style changes * Remove #undef _TARGET_X86_ * 2nd attempt to fix Windows build error * Revise per feedback * Revert the chagnes in clrdefinitions.cmake and add BIT32 in CMakeLists.txt * Use !BIT64 instead of BIT32 * Include exceptionhandling.cpp and gcinfodecoder.cpp in build This commit includes exceptionhandling.cpp and gcinfodecoder.cpp in build, and fixes related compile errors. * Fix COMPlus_EndCatch undefined reference * Fix build error * Fix GcInfoDecoder-related undefined references * Fix AdjustContextForVirtualStub undefined reference * Fix GetCallerSP undefined reference * Fix ResetThreadAbortState undefined reference * Attempt to fix Windows build error * Fix CLRNoCatchHandler undefined reference * Another attemp to fix Windows build error * Fix GetXXXFromRedirectedStubStackFrame undefined references * Fix Windows Build Error * Add RtlpGetFunctionEndAddress and RtlVirtualUnwind as NYI * Fix undefined references on JIT helpers * Enable Dummy Application Run with WIN64EXCEPTIONS * Revert "Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header" This reverts commit c2bad85ac1136be3c6fb6ad7eedc5b3814b2ab29. * Use indirect code header when WIN64EXCEPTIONS is enabled * Port 'SyncRegDisplayToCurrentContext' and 'FillRegDisplay' * Revise style 'RUNTIME_FUNCTION__SetUnwindInfoAddress' * Extract out HandlerData from #ifdef region * Add UNIXTODO * Add UNIXTODO * Port 'GetRegdisplayReturnValue' * Fix incorrect comment * Remove messages that mentions WIN32EXCEPTIONS * Revise AdjustContextForWriteBarrier * Port 'FaultingExceptionFrame::UpdateRegDisplay' * Extract out 'AdjustContextForVirtualStub' and 'CLRNoCatchHandler' from #ifdef region * Merge two #ifdef regions * Set WIN64EXCEPTIONS as a default for x86/Linux * Remove unnecessary #ifdef from ThrowControlForThread * Remove unnecessary stubs * Add Dependency Check between Compile Flags * Revise per feedback
2016-12-26Remove files related to legacy build system (#8723)Robert3-193/+0
2016-12-23Remove all usage of vsnprintf (#8709)Jan Vorlicek2-5/+1
This change removes all usages of vsnprintf and modifies runtime to not to use vsnprintf or _vsnprintf I've also fixed two issues in PAL TRACE function string format parameters that caused crashes when I was trying to run all PAL tests with PAL tracing enabled.
2016-12-21Remove FEATURE_BLC_FORMATTING (#8699)Jan Vorlicek1-1/+1
This feature is always defined and the PAL functions that would be used if the feature was not defined are not in PAL anymore.
2016-12-13Enable interop debugging for Windows amd64 and x86. (#8603)Mike McLaughlin2-7/+7
Found sos portable pdb problem on x86. Fixed interop problems between the native sos and SOS.NetCore managed helper assembly.
2016-12-12[x86/Linux][SOS] Add CALLBACK (aka stdcall) to function declarations (#8476)Evgeny Pavlov1-4/+4
2016-12-06[x86/Linux][SOS] Fix DataTarget::GetPointerSize for x86 (#8473)Evgeny Pavlov1-1/+1
2016-12-06[x86/Linux][SOS] Disable ARM target support for xplat (#8471)Evgeny Pavlov1-2/+9
2016-12-01fix permissive C++ code (MSVC /permissive-) (#8337)Phil Christensen2-33/+37
* fix permissive C++ code (MSVC /permissive-) These were found by the C++ compiler group when doing "Real world code" build tests using /permissive-. We are sharing these with you to help you clean up your code before the new version of the compiler comes out. For more information on /permissive- see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/. ---------------------------- Under /permissive-, skipping the initialization of a variable is not allowed. As an extension the compiler allowed this when there was no destructor for the type. void func(bool b) { if(b) goto END; int value = 0; //error C2362: initialization of 'value' is skipped by 'goto END' int array[10]; //Okay, not initialized. //... value used here END: return; } Fix 1) Limit the scope of value: { int value = 0; //... value used here } END: Fix 2) Initialize/declare value before the 'goto' int value = 0; if(b) goto END; //... value used here END: Fix 3) Don't initialize value in the variable declaration. int value; value = 0 //... value used here END: ------------------- Alternative token representations. The following are reserved as alternative representations for operators: and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq //Can't use reserved names for variables: static int and = 0; // Change name (possibly to 'and_') void func() { _asm { xor edx,edx // xor is reserved, change to uppercase XOR or eax,eax // or is reserved, change to uppercase OR } } * Apply formatting patch. * fixes from code review. I addressed @janvorli requests from the pull request code review.
2016-11-21Remove unsafe banned functions (#8162)Jan Vorlicek1-1/+1
This change removes _snwprintf, _snprintf and _vsnwprintf usage from CoreCLR and their implementations from PAL. PAL exposes their secure variants instead and CoreCLR now uses those instead. I have also removed the StringCchPrintfA/W, StringCchVPrintfA/W, StringCbVPrintfA/W, StringCbPrintfA/W, StringCbPrintfExA/W, StringCchVPrintfExA/W, StringCbVPrintfExA/W and StringCchPrintfExA/W replaced their usage by the secure variants of the sprintf functions, since they were used at only few places and implementing all of the variants using the secure sprintf variants would be a hassle. I also needed to fix a missing support for size modifiers for %p formatting character and for wide characters / strings in the secure sprintf functions that was revealed by the PAL tests. I have also removed a bunch of PAL tests that were using %n formatting character which was not implemented since it is considered unsafe and translated PAL tests that were using the removed functions to use the safe variants of those.
2016-11-10SOS: Automatically find a managed thread with an exception on Linux/OSX core ↵Mike McLaughlin2-0/+58
dumps (#8075) SOS: Automatically find a managed thread with an exception on Linux/OSX core dumps To be used in the debugger tests repo for SOS dump testing on Linux/OSX. Added the "clrthreads -managedexception" option to switch to the first managed thread that has thrown an exception. Issue #6518
2016-10-28Remove some unused PAL functions (#7873)Jan Vorlicek1-4/+0
This change removes some unused PAL functions and the corresponding PAL tests.
2016-10-28C++ conformance. (building with /permissive-) (#7855)Phil Christensen4-23/+23
These issues were found when building with the /permissive- flag in the latest version of MSVC. No tests were added/modified because this does not change any behavior. There are a few types of language conformance issues fixed in this: 1) Strict string conversion (this is also covered by the /Zc:strictStrings flag) The 'const' is not implicitly dropped by string literals, which means the following is not allowed: char str = "const string literal"; //error: cannot convert a 'const char' to a 'char*' This fix to to make str 'const char*'. (This can have a domino effect depending on where str is used) 2) Fully qualified inline declarations members inside class struct A { void A::f() { } // Error: illegal qualified name in member declaration, remove redundant 'A::' to fix }; 3) MSVC by default will allows name lookup in a dependent base. This is disabled by /permissive- template <class T> struct B { void f(); }; template <class T> struct D : public B<T> //B is a dependent base because its type depends on the type of T in D<T>. { //One possible fix is to uncomment the following line. If this //were a type we should have 'using typename'... //using B<T>::f; void g() { f(); //Error: identifier not found, one possible fix is change it to 'this->f();' } }; void h() { D<int> d; d.g(); } 4) Warning 4800 has been removed in version 19.1 (1910) of the compiler. For backwards compatability, surround the usage of 4800. This is not related to C++ conformance. #if _MSC_VER <= 1900 // 'BOOL' forcing value to bool 'true' or 'false' #pragma warning(disable: 4800) #endif
2016-10-25Check index before access (#7795)Dmitry-Me1-1/+1
2016-10-21Fix broken #elif (#7756)Dmitry-Me1-1/+1
2016-08-22Fix SOS build break from PR #6838. (#6845)dotnet bot1-2/+6
[tfs-changeset: 1623588]
2016-08-19Create SOS SymbolReader managed project and change SOS to use it. (#6783)Mike McLaughlin7-629/+572
* Change SOS to use wrapper class that is now in System.Diagnostics.StackTrace. The portable PDB helper code for SOS source/line support has been moved from System.Diagnostics.Debug.SymbolReader to a new managed SOS project in the coreclr repo called SOS.NETCore. The public APIs have now been made internal. Plumb through the loaded PE address to the managed SymbolReader functions so it can be used as a key. Fixed a stack trashing/overflow when a unresolved managed breakpoint is resolved because one of the module name buffers was too small (MAX_PATH_FNAME). Changed it (and others) to MAXLONGPATH. SOS now works with Portable PDBs on Windows. New dac private get module data request. Used to get the necessary info for portable PDBs. SOS now supports in-memory PE's on xplat and Windows. Needed to get and plumb though the in-memory PE layout where it is file based or loaded. Better Windows GetLineByILOffset support. Uses the SymbolReader and now works with in-memory PEs. Misc code formatting and general cleanup. * Code review feedback.
2016-08-15Arm64 Sos fixes forRama Krishnan Raghupathy4-13/+12
!verify heap !u !u -gcinfo
2016-08-04Clean up some SOS code.Aditya Mandaleeka1-52/+46
2016-08-04Cache failure to initialize SymbolReader logic in SOS.Aditya Mandaleeka2-12/+24
2016-08-01Change int return values to BOOL for coreclr delegates (#6551)Evgeny Pavlov2-26/+29
2016-07-27[SOS][ARM/Linux] Enable clru SOS command (#6477)Evgeny Pavlov1-6/+8
* Enable clru SOS command on ARM/Linux * Set thumb bit on ARM/Linux
2016-07-21[SOS][Linux] Fix incorrect processing 'setclrpath' command with portable PDB ↵Evgeny Pavlov1-6/+10
reader (#6358) * Fix incorrect processing 'setclrpath' command in lldb libsosplugin.so with portable PDB reader * Replace 'fprintf' and 'perror' to 'ExtErr'
2016-07-20GCInfo: Support versioning.Swaroop Sridhar6-21/+24
This change enables the VM to support multiple versions GCInfo concurrently. This is necessary in light of upcoming work to add ReturnType and other modifications to the GCInfo format -- so that existing ReadyToRun images will continue to run correctly. The version# is not stored in the GcInfo structure -- because it is wasteful to store the version once for every method. Instead, it is tracked per range-section of generated/loaded methods. The GCInfo version is computed as: 1) The current GCINFO_VERSION for JITted and Ngened images 2) A function of the Ready-to-run major version stored in READYTORUN_HEADER for ready-to-run images. ReadyToRunJitManager::JitTokenToGCInfoVersion() provides the GcInfo version for any Method. Currently, there's only one version of GCInfo. An abstraction GCInfoToken is added to the GcInfo interface, which tracks the {GcInfo, Version} pair in-memory. Several GcInfo APIs are modified to use GCInfoToken in place of GcInfo pointers. Notes: 1) SOS GcDump: The GCDump API has separate dump routines for Header and the pointer-liveness information (DumpGCTable and DumpGCHeader) each of which advance a pointer to the GCInfo block. These APIs are not changed to recieve a GCInfoToken in place of the GcInfo block pointer. Instead, they recieve the GcInfo version at the time of construction. 2) Some routines that are specific to x86 gcInfo (ex: crackMethodInfoHdr) are not yet updated to use versioning, since the development plan is to update the Non-x86 GcInfo structure first. 3) The x86 specific structs defining GcInfo headers are moved to GcInfoTypes.h, along with the non-x86 GcInfo type definitions.
2016-07-12Fix !PrintException (pe) -lines bug where line number/source info is not ↵Mike McLaughlin1-16/+7
being displayed. (#6241) The argument bLineNumbers to FormatGeneratedException was being used a local flag.