@@ -92,12 +92,7 @@ ds_rt_auto_trace_init (void)
9292 STATIC_CONTRACT_NOTHROW ;
9393
9494#ifdef FEATURE_AUTO_TRACE
95- EX_TRY
96- {
97- auto_trace_init ();
98- }
99- EX_CATCH {}
100- EX_END_CATCH (SwallowAllExceptions );
95+ auto_trace_init ();
10196#endif
10297}
10398
@@ -108,12 +103,7 @@ ds_rt_auto_trace_launch (void)
108103 STATIC_CONTRACT_NOTHROW ;
109104
110105#ifdef FEATURE_AUTO_TRACE
111- EX_TRY
112- {
113- auto_trace_launch ();
114- }
115- EX_CATCH {}
116- EX_END_CATCH (SwallowAllExceptions );
106+ auto_trace_launch ();
117107#endif
118108}
119109
@@ -124,12 +114,7 @@ ds_rt_auto_trace_signal (void)
124114 STATIC_CONTRACT_NOTHROW ;
125115
126116#ifdef FEATURE_AUTO_TRACE
127- EX_TRY
128- {
129- auto_trace_signal ();
130- }
131- EX_CATCH {}
132- EX_END_CATCH (SwallowAllExceptions );
117+ auto_trace_signal ();
133118#endif
134119}
135120
@@ -140,12 +125,7 @@ ds_rt_auto_trace_wait (void)
140125 STATIC_CONTRACT_NOTHROW ;
141126
142127#ifdef FEATURE_AUTO_TRACE
143- EX_TRY
144- {
145- auto_trace_wait ();
146- }
147- EX_CATCH {}
148- EX_END_CATCH (SwallowAllExceptions );
128+ auto_trace_wait ();
149129#endif
150130}
151131
@@ -159,18 +139,18 @@ bool
159139ds_rt_config_value_get_enable (void )
160140{
161141 STATIC_CONTRACT_NOTHROW ;
162- return CLRConfig ::GetConfigValue (CLRConfig ::EXTERNAL_EnableDiagnostics ) != 0 ;
142+
143+ // TODO: EventPipe Configuration values - RhConfig?
144+ return true;
163145}
164146
165147static
166148inline
167149ep_char8_t *
168150ds_rt_config_value_get_ports (void )
169151{
170- STATIC_CONTRACT_NOTHROW ;
171-
172- CLRConfigStringHolder value (CLRConfig ::GetConfigValue (CLRConfig ::EXTERNAL_DOTNET_DiagnosticPorts ));
173- return ep_rt_utf16_to_utf8_string (reinterpret_cast < ep_char16_t * > (value .GetValue ()), -1 );
152+ // TODO: EventPipe Configuration values - RhConfig?
153+ return nullptr ;
174154}
175155
176156static
@@ -179,7 +159,8 @@ uint32_t
179159ds_rt_config_value_get_default_port_suspend (void )
180160{
181161 STATIC_CONTRACT_NOTHROW ;
182- return static_cast < uint32_t > (CLRConfig ::GetConfigValue (CLRConfig ::EXTERNAL_DOTNET_DefaultDiagnosticPortSuspend )) ;
162+ // TODO: EventPipe Configuration values - RhConfig?
163+ return 0 ;
183164}
184165
185166/*
@@ -197,24 +178,11 @@ ds_rt_generate_core_dump (
197178 STATIC_CONTRACT_NOTHROW ;
198179
199180 ds_ipc_result_t result = DS_IPC_E_FAIL ;
200- EX_TRY
201- {
202- uint32_t flags = ds_generate_core_dump_command_payload_get_flags (payload );
203- if (commandId == DS_DUMP_COMMANDID_GENERATE_CORE_DUMP )
204- {
205- // For the old commmand, this payload field is a bool of whether to enable logging
206- flags = flags != 0 ? GenerateDumpFlagsLoggingEnabled : 0 ;
207- }
208- LPCWSTR dumpName = reinterpret_cast < LPCWSTR > (ds_generate_core_dump_command_payload_get_dump_name (payload ));
209- int32_t dumpType = static_cast < int32_t > (ds_generate_core_dump_command_payload_get_dump_type (payload ));
210- if (GenerateDump (dumpName , dumpType , flags , errorMessageBuffer , cbErrorMessageBuffer ))
211- {
212- result = DS_IPC_S_OK ;
213- }
214- }
215- EX_CATCH {}
216- EX_END_CATCH (SwallowAllExceptions );
217- return result ;
181+ uint32_t flags = ds_generate_core_dump_command_payload_get_flags (payload );
182+ // TODO: Generate an exception dump
183+ __debugbreak ();
184+
185+ return 0 ;
218186}
219187
220188/*
@@ -233,10 +201,11 @@ ds_rt_transport_get_default_name (
233201 const ep_char8_t * suffix )
234202{
235203 STATIC_CONTRACT_NOTHROW ;
236-
237- #ifdef TARGET_UNIX
238- PAL_GetTransportName (name_len , name , prefix , id , group_id , suffix );
239- #endif
204+
205+ // TODO: PAL_GetTransportName is defined in coreclr\pal\inc\pal.h
206+ // #ifdef TARGET_UNIX
207+ // PAL_GetTransportName (name_len, name, prefix, id, group_id, suffix);
208+ // #endif
240209 return true;
241210}
242211
@@ -289,14 +258,11 @@ ds_rt_profiler_attach (DiagnosticsAttachProfilerCommandPayload *payload)
289258 ClrFlsSetThreadType (ThreadType_ProfAPI_Attach );
290259
291260 HRESULT hr = S_OK ;
292- EX_TRY {
293- hr = ProfilingAPIUtility ::LoadProfilerForAttach (reinterpret_cast < const CLSID * > (ds_attach_profiler_command_payload_get_profiler_guid_cref (payload )),
294- reinterpret_cast < LPCWSTR > (ds_attach_profiler_command_payload_get_profiler_path (payload )),
295- reinterpret_cast < LPVOID > (ds_attach_profiler_command_payload_get_client_data (payload )),
296- static_cast < UINT > (ds_attach_profiler_command_payload_get_client_data_len (payload )),
297- static_cast < DWORD > (ds_attach_profiler_command_payload_get_attach_timeout (payload )));
298- }
299- EX_CATCH_HRESULT (hr );
261+ hr = ProfilingAPIUtility ::LoadProfilerForAttach (reinterpret_cast < const CLSID * > (ds_attach_profiler_command_payload_get_profiler_guid_cref (payload )),
262+ reinterpret_cast < LPCWSTR > (ds_attach_profiler_command_payload_get_profiler_path (payload )),
263+ reinterpret_cast < LPVOID > (ds_attach_profiler_command_payload_get_client_data (payload )),
264+ static_cast < UINT > (ds_attach_profiler_command_payload_get_client_data_len (payload )),
265+ static_cast < DWORD > (ds_attach_profiler_command_payload_get_attach_timeout (payload )));
300266
301267 // Clear the flag so this thread isn't permanently marked as the attach thread.
302268 ClrFlsClearThreadType (ThreadType_ProfAPI_Attach );
@@ -312,14 +278,11 @@ ds_rt_profiler_startup (DiagnosticsStartupProfilerCommandPayload *payload)
312278 STATIC_CONTRACT_NOTHROW ;
313279
314280 HRESULT hr = S_OK ;
315- EX_TRY {
316- StoredProfilerNode * profilerData = new StoredProfilerNode ();
317- profilerData -> guid = * (reinterpret_cast < const CLSID * > (ds_startup_profiler_command_payload_get_profiler_guid_cref (payload )));
318- profilerData -> path .Set (reinterpret_cast < LPCWSTR > (ds_startup_profiler_command_payload_get_profiler_path (payload )));
281+ StoredProfilerNode * profilerData = new StoredProfilerNode ();
282+ profilerData -> guid = * (reinterpret_cast < const CLSID * > (ds_startup_profiler_command_payload_get_profiler_guid_cref (payload )));
283+ profilerData -> path .Set (reinterpret_cast < LPCWSTR > (ds_startup_profiler_command_payload_get_profiler_path (payload )));
319284
320- g_profControlBlock .storedProfilers .InsertHead (profilerData );
321- }
322- EX_CATCH_HRESULT (hr );
285+ g_profControlBlock .storedProfilers .InsertHead (profilerData );
323286
324287 return hr ;
325288}
@@ -329,7 +292,9 @@ static
329292uint32_t
330293ds_rt_set_environment_variable (const ep_char16_t * name , const ep_char16_t * value )
331294{
332- return SetEnvironmentVariableW (reinterpret_cast < LPCWSTR > (name ), reinterpret_cast < LPCWSTR > (value )) ? S_OK : HRESULT_FROM_WIN32 (GetLastError ());
295+ // return SetEnvironmentVariableW(reinterpret_cast<LPCWSTR>(name), reinterpret_cast<LPCWSTR>(value)) ? S_OK : HRESULT_FROM_WIN32(GetLastError());
296+ __debugbreak ();
297+ return 0xffff ;
333298}
334299
335300/*
@@ -343,19 +308,8 @@ ds_rt_server_log_pause_message (void)
343308 STATIC_CONTRACT_NOTHROW ;
344309
345310 const char diagPortsName [ ] = "DOTNET_DiagnosticPorts" ;
346- CLRConfigNoCache diagPorts = CLRConfigNoCache ::Get (diagPortsName );
347- LPCSTR ports = nullptr;
348- if (diagPorts .IsSet ())
349- {
350- ports = diagPorts .AsString ();
351- }
352-
353- uint32_t port_suspended = ds_rt_config_value_get_default_port_suspend ();
354-
355- printf ("The runtime has been configured to pause during startup and is awaiting a Diagnostics IPC ResumeStartup command from a Diagnostic Port .\n ");
356- printf ("%s = \"%s\"\n" , diagPortsName , ports == nullptr ? "" : ports );
357- printf ("DOTNET_DefaultDiagnosticPortSuspend=%u\n" , port_suspended );
358- fflush (stdout );
311+ // TODO: Cannot find nocache versions of RhConfig
312+ __debugbreak ();
359313}
360314
361315#endif /* ENABLE_PERFTRACING */
0 commit comments