summaryrefslogtreecommitdiff
path: root/src/debug
AgeCommit message (Collapse)AuthorFilesLines
2019-03-05Remove dead ContainToAppDomain (#23021)Steve MacLean1-1/+0
* Remove dead ContainToAppDomain * Respond to feedback
2019-03-03Cleanup more GCC warnings (#22872)Sinan Kaya1-2/+2
* Add parenthesis src/vm/sha1.cpp: In function ‘void SHA1_block(SHA1_CTX*)’: src/vm/sha1.cpp:93:29: warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses] #define ROUND3(B, C, D) ((C & (B | D) | (B & D)) + sha1_round3) ^ src/vm/sha1.cpp:139:32: note: in expansion of macro ‘ROUND3’ e += ROTATE32L(a, 5) + ROUND3(b, c, d) + msg80[i]; * Move declaration into same file as one was defined Extern the other one was static * Remove hr=hr undefined assignment * Fix mutli-line comment warning * Convert multi-character literal * Remove null check for stack local variables rc/vm/invokeutil.cpp: In static member function ‘static void InvokeUtil::SetValidField(CorElementType, TypeHandle, FieldDesc*, OBJECTREF*, OBJECTREF*, TypeHandle, CLR_BOOL*)’: src/vm/invokeutil.cpp:978:29: warning: the address of ‘Throwable’ will never be NULL [-Waddress] EX_CATCH_THROWABLE(&Throwable); ^ src/inc/ex.h:1087:21: note: in definition of macro ‘EX_CATCH_THROWABLE’ if (NULL != ppThrowable) ^
2019-02-26Address janvorli's feedback commentsAdeel1-25/+25
2019-02-26Merge branch 'master' into fix/signed-compare-and-narrowingAdeel Mujahid4-8/+8
2019-02-26GCC compatibility fixes #7 (#22810)Sinan Kaya4-8/+8
* Use thread_local for thread local storage on non MSVC targets * Use local copy of visitor rather than function parameter * Remove extra class qualifier * Replace hex number representation in ASM files * Reorder STDAPI and DLLEXPORT * Suppress conversion Suppress warning during hash add casting * Remove anonymous struct src/vm/codeversion.h:112:16: warning: ‘struct NativeCodeVersion::<anonymous union>::SyntheticStorage’ invalid; an anonymous union can only have non-static data members [-fpermissive] struct SyntheticStorage * Remove class declaration Remove extra class declaration * Remove extern C * Add implicit paranthesis src/vm/amd64/virtualcallstubcpu.hpp:735:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF; ^ src/vm/amd64/virtualcallstubcpu.hpp:741:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF; Add parenthesis src/vm/dataimage.cpp:631:55: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size Add parenthesis src/debug/daccess/daccess.cpp:6871:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] _ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL); Add parenthesis src/vm/dataimage.cpp:631:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size) * Initialize member 1 src/ilasm/method.cpp:35:36: warning: operation on ‘((Method*)this)->Method::m_ulColumns[0]’ may be undefined [-Wsequence-point] m_ulColumns[0]=m_ulColumns[0]=0; * Remove unknown compiler option * Abstract DLLEXPORT
2019-02-25Address janvorli's feedback commentsAdeel1-2/+2
2019-02-24Fix comparison and narrowing errors reported by GCCAdeel3-10/+10
2019-02-22More GNUC Fixes (#22687)Sinan Kaya3-11/+12
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2019-02-19Fix CLRDataCreateInstance export. This was breaking SOS. (#22701)Mike McLaughlin3-3/+12
Fix CLRDataCreateInstance export. This was breaking SOS. Added the right cmake magic so the function is exported properly.
2019-02-16Fix visibility and signed comparison issues for GCC (#22586)Adeel Mujahid1-339/+336
* Fix visibility and signed comparison issues for GCC * Fix hidden _CLRDataCreateInstance warned by macOS * Fix indentation in vswprintf/test1 * Change void* to PVOID in implementation files
2019-02-15Disable arm64 contracts. (#22605)Sergey Andreenko2-42/+0
* Fix ifdef for `g_DbgSuppressAllocationAsserts`. It needs to be defined under `FEATURE_INTEROP_DEBUGGING`. * Unify contracts disabling for UNIX/ARM. It also disables some parts that were disabled for ARM, but not for UNIX. It fixes the difference that we see between ARM32 and ARM64 Unix Checked. * Disable contracts on arm64. FIxes the difference that we see between windows arm32 and arm64 in checked/debug builds. * Revert CoreFX arm64 timeout change. That is no longer necessary. * Reenable arm64 corefx jobs. They should not fail with timeouts anymore. * Don't allow `g_DbgSuppressAllocationAsserts` defnition in release builds. * delete AssertAllocationAllowed
2019-02-10Cleanup DLL exports (#22500)Jan Kotas1-3/+4
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid5-9/+11
2019-02-07Cleanup LLVM assumption (#22456)Sinan Kaya1-2/+2
We want to support GNU compilation for CoreCLR. Luckily both LLVM and GNU compilers define __GNUC__ and there are a lot of things they can share.
2019-02-06Implement ↵Marek Safar1-1/+0
ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute (#22372) * Implement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute in shared managed code * Remove native ::GetNeutralResourcesLanguage
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara10-187/+0
2019-01-14Making sure the nativeCodeVersion flowing change works with Rejit and EnC ↵Andrew Au1-1/+11
(#21961)
2019-01-11Flowing the nativeCodeVersion to DebuggerJitInfo (#21925)Andrew Au5-63/+67
2019-01-08Fix issue #20585 createdump explicitly uses /tmp. (#21866)Mike McLaughlin1-5/+19
Changed to PAL's GetTempPathA to get the temp path.
2019-01-08Fixed potential memory leak (#21872)Oded Hanson1-0/+1
2019-01-07Actually fix issue #21484 reported by the customer. (#21850)Mike McLaughlin1-5/+13
GC heap globals like ephemeral_heap_segment and finalize_queue are null/invalid for a server GC. Add a check to skip the workstation GC memory enumeration if server. The server memory enumeration already skips if workstation GC.
2019-01-07Respect the instrumented code maps passed by the profiler in a rejit (#21786)David Mason1-3/+24
We currently do not respect the rejit provided instrumentation maps in DebuggerJitInfo::SetBoundaries, this change updates it to use the rejit map if one exists.
2019-01-04Fix misspelling (#21640)Matt Galbraith1-1/+1
2019-01-04If the debugger is stopped on a garbage collection event, resuming the ↵Andrew Au1-7/+16
threads during detach should simply be setting the event (#21764)
2019-01-03Merge pull request #21774 from hoyosjs/juhoyosa/event_sizeJuan Hoyos1-1/+3
Add payload size case for GC events
2019-01-01Cleanup ArgumentNull_Obj references in unmanaged runtime (#21738)Jan Kotas1-10/+10
2018-12-17Add payload size case for GC eventsJuan Hoyos1-1/+3
2018-12-13Setting the m_willBlockOnGarbageCollectionEvent earlier and only when we ↵Andrew Au2-11/+25
will block to avoid the async break deadlock (#21319) Setting the m_willBlockOnGarbageCollectionEvent earlier and only when we will block to avoid the async break deadlock
2018-12-13Fixes issue #21485 and #21484 (#21526)Mike McLaughlin2-11/+30
Issue #21485: fix EnumProcessModules hPseudoCurrentProcess bug. Added handle reference. Issue #21484: createdump segfaults with ASP.NET app The problem is the ClrDataModule Request faulted on a dynamic module getting the file layout flag. Fixed the Request code not get the file layout and in the crash dump code skip any dynamic modules.
2018-12-12Added support for debugging a sandboxed app on Mac (#21068)Oded Hanson28-125/+280
* Fixed bug in StackString where the size is not initialized correctly to STACK_COUNT * Added CharString and WCharString template classes and a generic CharStringFromLPCWSTR method * Added support for debugging a sandboxed app on Mac This change fixes the usage of IPC while debugging while running in a sandbox. When running in a sandbox, the temporary folder for each process will be different. Thus the pipes being created in TwoWayPipe right now would be created in different directories in the debugger process and the process being debugged. This change configures the folder to be used based on the application group ID that the sandboxed app belongs to. For the same reasons, the names sempahores being used to synchronize the debugger attach need to be prefixed with the application group ID. This change was abit more involved since the name of the semaphore is limited to 31 characters, so we had to encode the semaphore names differently to make them shorter. Last, new APIs to the debugger shim were added to support this new feature. This change only handles the runtime side and the dbgshim. An additional change to vsdbg needs to be done to use the new APIs. fixes #21066 * Fixed build breaks on non Mac Unix platforms * Fixed usage of gApplicationGroupId in non apple environments * Fixed bug in semaphore names * Got rid of usage of StackString * Made PAL_GetApplicationGroupId Apple specific * Added comment about pragma pack * Fixed comment * Added exported symbols * Duplicated applicationGroupId so it can be used from another thread during register complete callback * Renamed BitNum2ByteNum to GetExtraEncodedAreaSize to make intent clearer * Fixed nit comments * Removed redundant changes in StackString * Fixed windows build break * Fixed compilation switch from __APPLE to __APPLE__ * Added missing exports
2018-12-10Delete vm/context.* (#21459)Jan Kotas5-16/+5
* Delete vm/context.* Leftover from remoting
2018-12-03Remove IsNeutralDomain() (#21318)Steve MacLean3-157/+26
* Remove IsNeutralDomain() * PR feedback
2018-11-28Remove obsolete assert (#21260)Andrew Au1-2/+0
2018-11-28Delete code related to LoaderOptimization and SharedDomain (#21031)Jan Kotas5-77/+10
2018-11-26Fix a use after free for Managed Data BP (#21205)Chuck Ries1-4/+6
ShimProxyCallback::DataBreakpoint::DataBreakpointEvent was holding onto a bare BYTE* for the CONTEXT rather than copying the buffer and taking ownership. Due to lifetime, this resulted in a use after free. Apparently in retail code we got lucky and this worked enough of the time that we never noticed it.
2018-11-23Fix debugger collectible thread statics access (#21175)Jan Vorlicek1-13/+16
The CordbClass::GetStaticFieldValue2 was missing support for accessing thread statics in collectible classes. Fortunately the fix was simple, we can use the same code path as for non-collectible thread statics.
2018-11-21Single stepping out of the unsafe places (#21135)Andrew Au2-18/+53
2018-11-20Delete CORCOMPILE_IMPORT_TABLE_ENTRY (#21109)Jan Kotas2-71/+20
2018-11-16Fix unloadability races (#21024)Jan Vorlicek3-16/+9
* Fix LoaderAllocator::AllocateHandle When another thread wins the race in growing the handle table, the code was not refreshing the slotsUsed local to the new up to date value. This was leading to overwriting / reusing a live handle. This change fixes it. * Embed ThreadLocalBlock in Thread Instead of allocating ThreadLocalBlock dynamically, embed it in the Thread. That solves race issue between thread destruction and LoaderAllocator destruction. The ThreadLocalBlock could have been deleted during Thread shutdown while the LoaderAllocator's destruction would be working with it.
2018-11-15Delete HAS_FLS_SUPPORT and related code (#21035)Jan Kotas3-36/+3
2018-11-14Fix warnings because of Bool incompatibalitySwaroop Sridhar1-1/+1
Fix a compile warning because of bool vs BOOL incompatibality. Fixes a build break in the new VS compiler.
2018-11-12Passing the CONTEXT in ICorDebugManagedCallback4::DataBreakpoint (#20960)Andrew Au8-28/+29
* Passing the CONTEXT in ICorDebugManagedCallback4::DataBreakpoint * ifdef out the message sending on configurations that does not support data breakpoint
2018-11-09Delete dead/unreachable code related to remoting (#20880)Jan Kotas3-20/+5
2018-11-08Revert "Passing the CONTEXT in ICorDebugManagedCallback4::DataBreakpoint"Jan Kotas8-23/+27
This reverts commit 9dd2a3688320fa197a3a2a412523416f10e7fa3b.
2018-11-08Passing the CONTEXT in ICorDebugManagedCallback4::DataBreakpointAndrew Au8-27/+23
2018-11-06Pull out GetContainingObjectAndrew Au7-197/+7
2018-11-06More code review feedbackAndrew Au5-46/+65
2018-11-06GetContainingObject should be a method of ICorDebugValueAndrew Au3-58/+111
2018-11-06Change GetContainingObject APIAndrew Au3-7/+76
2018-11-06FEATURE_DATABREAKPOINTAndrew Au4-29/+29