Skip to content

Commit e89d944

Browse files
[MERGE chakra-core#1031] Remove hybrid debugging support
Merge pull request chakra-core#1031 from agarwal-sandeep:nohybrid
2 parents 8e28ceb + 86f1846 commit e89d944

9 files changed

Lines changed: 22 additions & 241 deletions

File tree

lib/Common/ConfigFlagsList.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ PHASE(All)
414414
#define DEFAULT_CONFIG_Loop (1)
415415
#define DEFAULT_CONFIG_ForceDiagnosticsMode (false)
416416
#define DEFAULT_CONFIG_EnableJitInDiagMode (true)
417-
#define DEFAULT_CONFIG_EnableJitInHybridDebugging (true)
418417
#define DEFAULT_CONFIG_UseFullName (true)
419418
#define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers (true)
420419
#define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns (true)
@@ -933,7 +932,6 @@ FLAGNR(Boolean, ForcePostLowerGlobOptInstrString, "Force tracking of globopt ins
933932
FLAGNR(Boolean, ForceSplitScope , "All functions will have unmerged body and param scopes", DEFAULT_CONFIG_ForceSplitScope)
934933
FLAGNR(Boolean, EnumerateSpecialPropertiesInDebugger, "Enable enumeration of special debug properties", DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger)
935934
FLAGNR(Boolean, EnableJitInDiagMode , "Enable Fast F12 (only applicable with ForceDiagnosticsMode or while under debugger)", DEFAULT_CONFIG_EnableJitInDiagMode)
936-
FLAGR (Boolean, EnableJitInHybridDebugging, "Enable Fast Debugging for Hybrid Debugging. Node: to turn this ON in full, EnableJitInDiagMode must be ON as well.", DEFAULT_CONFIG_EnableJitInHybridDebugging)
937935
FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForHelpers, "Enable wrapper over helper methods in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers)
938936
FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForBuiltIns, "Enable wrapper over library calls in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns)
939937
FLAGNR(Boolean, EnableFunctionSourceReportForHeapEnum, "During HeapEnum, whether to report function source info (url/row/col)", DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum)

lib/Common/Core/ConfigFlagsTable.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include "Memory/PageHeapBlockTypeFilter.h"
77

88
#include <initguid.h>
9-
// {17DC713D-8B3E-4434-9DC8-90C275C75194}
10-
DEFINE_GUID(HybridDebuggingGuid, 0x17dc713d, 0x8b3e, 0x4434, 0x9d, 0xc8, 0x90, 0xc2, 0x75, 0xc7, 0x51, 0x94);
119

1210
#undef DebugBreak
1311

@@ -1170,28 +1168,15 @@ namespace Js
11701168
// Configuration options
11711169
//
11721170

1173-
Configuration::Configuration() : isHybridDebugging(false)
1171+
Configuration::Configuration()
11741172
{
1175-
if(IsDebuggerPresent())
1176-
{
1177-
if(IsEqualGUID(hybridDebuggingGuid, HybridDebuggingGuid))
1178-
{
1179-
isHybridDebugging = true;
1180-
}
1181-
}
11821173
}
11831174

11841175
bool Configuration::EnableJitInDebugMode()
11851176
{
1186-
return (!IsHybridDebugging() || CONFIG_FLAG(EnableJitInHybridDebugging)) && CONFIG_FLAG(EnableJitInDiagMode);
1177+
return CONFIG_FLAG(EnableJitInDiagMode);
11871178
}
11881179

1189-
bool Configuration::IsHybridDebugging()
1190-
{
1191-
return isHybridDebugging;
1192-
}
1193-
1194-
11951180
Configuration Configuration::Global;
11961181

11971182

lib/Common/Core/ConfigFlagsTable.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,16 +502,10 @@ namespace Js
502502
ConfigFlagsTable flags;
503503
static Configuration Global;
504504
bool EnableJitInDebugMode();
505-
bool IsHybridDebugging();
506505

507506
// Public in case the client wants to have
508507
// a separate config from the global one
509508
Configuration();
510-
511-
private:
512-
GUID hybridDebuggingGuid; // Set to HybridDebuggingGuid when hybrid debugging - set by the out of process debugging component - jscript9diag.
513-
// Otherwise, remains un-initialized
514-
bool isHybridDebugging;
515509
};
516510

517511
//Create macros for a useful subset of the config options that either get the value from the configuration (if the option is enabled) or

lib/Parser/rterrors.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ RT_ERROR_MSG(ASYNCERR_NoErrorInErrorState, 5200, "", "Status is 'error', but get
282282
RT_ERROR_MSG(ASYNCERR_InvalidStatusArg, 5201, "", "Missing or invalid status parameter passed to completed handler", kjstError, 0)
283283
RT_ERROR_MSG(ASYNCERR_InvalidSenderArg, 5202, "", "Missing or invalid sender parameter passed to completed handler", kjstError, 0)
284284

285-
// Error messages for hybrid debugging
286-
RT_ERROR_MSG(DIAGERR_FunctionCallNotSupported, 5400, "", "Function evaluation is disabled while debugging native code", kjstError, 0)
287-
RT_ERROR_MSG(DIAGERR_EvaluateNotSupported, 5401, "", "Evaluation of the JavaScript expression is not supported while debugging native code", kjstError, 0)
288-
289285
RT_ERROR_MSG(JSERR_InvalidCodePoint, 5600, "Invalid code point %s", "Invalid code point", kjstRangeError, 0)
290286
RT_ERROR_MSG(JSERR_InvalidNormalizationForm, 5601, "Normalization form '%s' is invalid. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD'].", "Invalid normalization form. Expected one of: ['NFC', 'NFD', 'NFKC', 'NFKD']", kjstRangeError, 0)
291287
RT_ERROR_MSG(JSERR_InvalidUnicodeCharacter, 5602, "Failed to normalize: invalid or missing unicode character at index %d.", "Failed to normalize: invalid or missing unicode character.", kjstRangeError, 0)

lib/Runtime/Base/ScriptContext.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,11 +2741,7 @@ if (!sourceList)
27412741
// Disable QC while functions are re-parsed as this can be time consuming
27422742
AutoDisableInterrupt autoDisableInterrupt(this->threadContext->GetInterruptPoller(), true);
27432743

2744-
if ((hr = this->GetDebugContext()->RundownSourcesAndReparse(shouldPerformSourceRundown, /*shouldReparseFunctions*/ true)) == S_OK)
2745-
{
2746-
HRESULT hr2 = this->GetLibrary()->EnsureReadyIfHybridDebugging(); // Prepare library if hybrid debugging attach
2747-
Assert(hr2 != E_FAIL); // Omitting HRESULT
2748-
}
2744+
hr = this->GetDebugContext()->RundownSourcesAndReparse(shouldPerformSourceRundown, /*shouldReparseFunctions*/ true);
27492745

27502746
// Debugger attach/detach failure is catastrophic, take down the process
27512747
DEBUGGER_ATTACHDETACH_FATAL_ERROR_IF_FAILED(hr);

lib/Runtime/Base/Utf8SourceInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ namespace Js
4545
return (this->debugModeSource != nullptr || this->debugModeSourceIsEmpty) && this->m_isInDebugMode;
4646
}
4747

48-
// For Hybrid debugging purposes we need to have the source mapped in because chakra may be in a frozen state when the source would be needed.
4948
void SetInDebugMode(bool inDebugMode)
5049
{
5150
AssertMsg(!GetIsLibraryCode(), "Shouldn't call SetInDebugMode for Library code.");

lib/Runtime/Debug/ProbeContainer.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -530,17 +530,7 @@ namespace Js
530530
}
531531
});
532532

533-
if (localPendingProbeList->Count() == 0)
534-
{
535-
// The breakpoint could have been initiated by hybrid debugging
536-
if (Js::Configuration::Global.IsHybridDebugging())
537-
{
538-
debugManager->stepController.Deactivate(pHaltState);
539-
debugManager->asyncBreakController.Deactivate();
540-
haltCallbackProbe->DispatchHalt(pHaltState);
541-
}
542-
}
543-
else
533+
if (localPendingProbeList->Count() != 0)
544534
{
545535
localPendingProbeList->MapUntil([&](int index, Probe * probe)
546536
{

0 commit comments

Comments
 (0)