summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/Strike/disasm.h
AgeCommit message (Collapse)AuthorFilesLines
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-3/+0
2016-07-20GCInfo: Support versioning.Swaroop Sridhar1-4/+4
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-04-27ARM, SOS: Fix fail to load libsos.so while debugging with lldbSaeHie Park1-3/+4
Related issue: #4428 With minor fix for ARM compile in SOS ARM: Fix ARM-Linux in SOS with lldb Fix ARM architecture type in SOS so that it works for ARM-Linux. Before this patch, lldb stops with architecture not supported. SOS ARM-Linux works with LLDB-3.8 and higher. Actual SOS commands for ARM may need testing and fixing.
2016-02-25Create a version resilient interface between sos (libsos.so) and the lldb pluginMike McLaughlin1-8/+7
(libsosplugin.so). There is a ILLDBServices interface between the two with a proper QI/Addref/Release interface so we can add new interfaces later and still be backwards and forward compatible. Internally in sos there is a DebugClient wrapper around this interface that makes it look like all the individual dbgeng interfaces (IDebugControl4, IDebugSymbols, IDebugDataSpaces, etc) even with QI, etc. Enable the sos the u (clru), DumpStack (dumpstack), EEStack (eestack), DumpIL (dumpil), DumpSig and DumpSigElem commands (aliases in parans). Add the clrstack -f option that displays the intermixed native and managed frames when managed assembly and offsets. Implement GetContextFromFrame. Enable the _EFN_* exported functions. Add source file/line number support (native only) via GetLineByOffset. Fix bug when executed just "sos". Displays help now. Disable the U -gcinfo option since it isn't implemented on xplat because it uses Windows fibers. Fixed a problem where some HelperMethodFrames were not unwinding; clrstack would stop without displaying managed functions on the stack. The HelperMethodFrames were not sometimes unwinding because the lldb VirtualUnwind used by the DAC was using (via the data target) to do the out of context unwind has some limitations. lldb doesn't have a way to unwind an arbitrary register context so the VirtualUnwind implementation searches through the thread's frames until it finds a match and returns the next one. The match was an exact match and in some cases it didn't find a frame. Changed it to check if the incoming context's SP is in between frames and return the next one if so. Only add the special internal "corerun" lldb plugin command in debug builds.
2016-01-27Update license headersdotnet-bot1-4/+3
2015-08-27Enabled GCInfo, EEHeap, DumpRuntimeTypes and EHInfo SOS commands.Mike McLaughlin1-1/+6
Added some aliases for the most common commands: bpmd -> sos bpmd clrstack -> sos ClrStack clrthreads -> sos Threads dumpheap -> sos DumpHeap dumpobj -> sos DumpObj dso -> sos DumpStackObjects eeheap -> sos EEHeap gcroot -> sos GCRoot ip2md -> sos IP2MD printexception -> sos PrintException Updated the debugging documentation. Remove the "build.out" file unintentionally added.
2015-08-22Enable gcroot and other gc related sos commands.Mike McLaughlin1-1/+1
The "gcroot" command currently doesn't work with lldb 3.6 (our default package), but works fine with lldb 3.7.0. lldb 3.6 terminates with (lldb) sos GCRoot 00007fffcc004ce8 *** Error in `lldb-3.6': munmap_chunk(): invalid pointer: 0x000000000184cde8 *** PAL_STDCPP_COMPAT is the define that the VS team added to allow the xplat headers to be used. This is neccessary for the whole SOS directory now because gcroot and other gc commands need unorderd_map, unorderd_set, etc. from the stdlib. Had to change all wchar_t to WCHAR because the xplat stdlib default is UTF32. Had to rename and provide macros that conflict with the stdlib: wcslen -> _wcslen wcsncmp -> _wcsncmp wcsrchr -> _wcsrchr wcscmp -> _wcscmp wcschr -> _wcschr wcscspn -> _wcscspn wcscat -> _wcscat __in -> ___in __out -> ___out max(a, b) -> _max(a, b) min(a, b) -> _min(a, b) Had to ifdef PAL_STDCPP_COMPAT a lot more of pal.h, palrt.h and some other header files. Changed a bunch of L"" to W("").
2015-07-29Fix prefast warnings in CLR codeEugene Zemtsov1-1/+1
[tfs-changeset: 1507366]
2015-03-10Fix some more build problems/missing globals. The ClrStack command builds ↵Mike McLaughlin1-1/+0
and almost runs except for a thread id problem.
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+450
[tfs-changeset: 1407945]