Deleted Added
full compact
Target.h (258054) Target.h (258884)
1//===-- Target.h ------------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 175 unchanged lines hidden (view full) ---

184 static const uint32_t default_timeout = 500000;
185 EvaluateExpressionOptions() :
186 m_execution_policy(eExecutionPolicyOnlyWhenNeeded),
187 m_language (lldb::eLanguageTypeUnknown),
188 m_coerce_to_id(false),
189 m_unwind_on_error(true),
190 m_ignore_breakpoints (false),
191 m_keep_in_memory(false),
1//===-- Target.h ------------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 175 unchanged lines hidden (view full) ---

184 static const uint32_t default_timeout = 500000;
185 EvaluateExpressionOptions() :
186 m_execution_policy(eExecutionPolicyOnlyWhenNeeded),
187 m_language (lldb::eLanguageTypeUnknown),
188 m_coerce_to_id(false),
189 m_unwind_on_error(true),
190 m_ignore_breakpoints (false),
191 m_keep_in_memory(false),
192 m_run_others(true),
192 m_try_others(true),
193 m_stop_others(true),
193 m_debug(false),
194 m_debug(false),
195 m_trap_exceptions(true),
194 m_use_dynamic(lldb::eNoDynamicValues),
195 m_timeout_usec(default_timeout)
196 {}
197
198 ExecutionPolicy
199 GetExecutionPolicy () const
200 {
201 return m_execution_policy;
202 }
203
196 m_use_dynamic(lldb::eNoDynamicValues),
197 m_timeout_usec(default_timeout)
198 {}
199
200 ExecutionPolicy
201 GetExecutionPolicy () const
202 {
203 return m_execution_policy;
204 }
205
204 EvaluateExpressionOptions&
206 void
205 SetExecutionPolicy (ExecutionPolicy policy = eExecutionPolicyAlways)
206 {
207 m_execution_policy = policy;
207 SetExecutionPolicy (ExecutionPolicy policy = eExecutionPolicyAlways)
208 {
209 m_execution_policy = policy;
208 return *this;
209 }
210
211 lldb::LanguageType
212 GetLanguage() const
213 {
214 return m_language;
215 }
216
210 }
211
212 lldb::LanguageType
213 GetLanguage() const
214 {
215 return m_language;
216 }
217
217 EvaluateExpressionOptions&
218 void
218 SetLanguage(lldb::LanguageType language)
219 {
220 m_language = language;
219 SetLanguage(lldb::LanguageType language)
220 {
221 m_language = language;
221 return *this;
222 }
223
224 bool
225 DoesCoerceToId () const
226 {
227 return m_coerce_to_id;
228 }
229
222 }
223
224 bool
225 DoesCoerceToId () const
226 {
227 return m_coerce_to_id;
228 }
229
230 EvaluateExpressionOptions&
230 void
231 SetCoerceToId (bool coerce = true)
232 {
233 m_coerce_to_id = coerce;
231 SetCoerceToId (bool coerce = true)
232 {
233 m_coerce_to_id = coerce;
234 return *this;
235 }
236
237 bool
238 DoesUnwindOnError () const
239 {
240 return m_unwind_on_error;
241 }
242
234 }
235
236 bool
237 DoesUnwindOnError () const
238 {
239 return m_unwind_on_error;
240 }
241
243 EvaluateExpressionOptions&
242 void
244 SetUnwindOnError (bool unwind = false)
245 {
246 m_unwind_on_error = unwind;
243 SetUnwindOnError (bool unwind = false)
244 {
245 m_unwind_on_error = unwind;
247 return *this;
248 }
249
250 bool
251 DoesIgnoreBreakpoints () const
252 {
253 return m_ignore_breakpoints;
254 }
255
246 }
247
248 bool
249 DoesIgnoreBreakpoints () const
250 {
251 return m_ignore_breakpoints;
252 }
253
256 EvaluateExpressionOptions&
254 void
257 SetIgnoreBreakpoints (bool ignore = false)
258 {
259 m_ignore_breakpoints = ignore;
255 SetIgnoreBreakpoints (bool ignore = false)
256 {
257 m_ignore_breakpoints = ignore;
260 return *this;
261 }
262
263 bool
264 DoesKeepInMemory () const
265 {
266 return m_keep_in_memory;
267 }
268
258 }
259
260 bool
261 DoesKeepInMemory () const
262 {
263 return m_keep_in_memory;
264 }
265
269 EvaluateExpressionOptions&
266 void
270 SetKeepInMemory (bool keep = true)
271 {
272 m_keep_in_memory = keep;
267 SetKeepInMemory (bool keep = true)
268 {
269 m_keep_in_memory = keep;
273 return *this;
274 }
275
276 lldb::DynamicValueType
277 GetUseDynamic () const
278 {
279 return m_use_dynamic;
280 }
281
270 }
271
272 lldb::DynamicValueType
273 GetUseDynamic () const
274 {
275 return m_use_dynamic;
276 }
277
282 EvaluateExpressionOptions&
278 void
283 SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget)
284 {
285 m_use_dynamic = dynamic;
279 SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget)
280 {
281 m_use_dynamic = dynamic;
286 return *this;
287 }
288
289 uint32_t
290 GetTimeoutUsec () const
291 {
292 return m_timeout_usec;
293 }
294
282 }
283
284 uint32_t
285 GetTimeoutUsec () const
286 {
287 return m_timeout_usec;
288 }
289
295 EvaluateExpressionOptions&
290 void
296 SetTimeoutUsec (uint32_t timeout = 0)
297 {
298 m_timeout_usec = timeout;
291 SetTimeoutUsec (uint32_t timeout = 0)
292 {
293 m_timeout_usec = timeout;
299 return *this;
300 }
301
302 bool
294 }
295
296 bool
303 GetRunOthers () const
297 GetTryAllThreads () const
304 {
298 {
305 return m_run_others;
299 return m_try_others;
306 }
307
300 }
301
308 EvaluateExpressionOptions&
309 SetRunOthers (bool run_others = true)
302 void
303 SetTryAllThreads (bool try_others = true)
310 {
304 {
311 m_run_others = run_others;
312 return *this;
305 m_try_others = try_others;
313 }
314
315 bool
306 }
307
308 bool
309 GetStopOthers () const
310 {
311 return m_stop_others;
312 }
313
314 void
315 SetStopOthers (bool stop_others = true)
316 {
317 m_stop_others = stop_others;
318 }
319
320 bool
316 GetDebug() const
317 {
318 return m_debug;
319 }
320
321 GetDebug() const
322 {
323 return m_debug;
324 }
325
321 EvaluateExpressionOptions&
326 void
322 SetDebug(bool b)
323 {
324 m_debug = b;
327 SetDebug(bool b)
328 {
329 m_debug = b;
325 return *this;
326 }
330 }
331
332 bool
333 GetTrapExceptions() const
334 {
335 return m_trap_exceptions;
336 }
337
338 void
339 SetTrapExceptions (bool b)
340 {
341 m_trap_exceptions = b;
342 }
327
328private:
329 ExecutionPolicy m_execution_policy;
330 lldb::LanguageType m_language;
331 bool m_coerce_to_id;
332 bool m_unwind_on_error;
333 bool m_ignore_breakpoints;
334 bool m_keep_in_memory;
343
344private:
345 ExecutionPolicy m_execution_policy;
346 lldb::LanguageType m_language;
347 bool m_coerce_to_id;
348 bool m_unwind_on_error;
349 bool m_ignore_breakpoints;
350 bool m_keep_in_memory;
335 bool m_run_others;
351 bool m_try_others;
352 bool m_stop_others;
336 bool m_debug;
353 bool m_debug;
354 bool m_trap_exceptions;
337 lldb::DynamicValueType m_use_dynamic;
338 uint32_t m_timeout_usec;
339};
340
341//----------------------------------------------------------------------
342// Target
343//----------------------------------------------------------------------
344class Target :

--- 391 unchanged lines hidden (view full) ---

736
737 void
738 ModulesDidUnload (ModuleList &module_list, bool delete_locations);
739
740 void
741 SymbolsDidLoad (ModuleList &module_list);
742
743 void
355 lldb::DynamicValueType m_use_dynamic;
356 uint32_t m_timeout_usec;
357};
358
359//----------------------------------------------------------------------
360// Target
361//----------------------------------------------------------------------
362class Target :

--- 391 unchanged lines hidden (view full) ---

754
755 void
756 ModulesDidUnload (ModuleList &module_list, bool delete_locations);
757
758 void
759 SymbolsDidLoad (ModuleList &module_list);
760
761 void
744 ClearModules();
762 ClearModules(bool delete_locations);
745
746 //------------------------------------------------------------------
763
764 //------------------------------------------------------------------
765 /// Called as the last function in Process::DidExec().
766 ///
767 /// Process::DidExec() will clear a lot of state in the process,
768 /// then try to reload a dynamic loader plugin to discover what
769 /// binaries are currently available and then this function should
770 /// be called to allow the target to do any cleanup after everything
771 /// has been figured out. It can remove breakpoints that no longer
772 /// make sense as the exec might have changed the target
773 /// architecture, and unloaded some modules that might get deleted.
774 //------------------------------------------------------------------
775 void
776 DidExec ();
777
778 //------------------------------------------------------------------
747 /// Gets the module for the main executable.
748 ///
749 /// Each process has a notion of a main executable that is the file
750 /// that will be executed or attached to. Executable files can have
751 /// dependent modules that are discovered from the object files, or
752 /// discovered at runtime as things are dynamically loaded.
753 ///
754 /// @return

--- 249 unchanged lines hidden (view full) ---

1004 GetImageSearchPathList ();
1005
1006 ClangASTContext *
1007 GetScratchClangASTContext(bool create_on_demand=true);
1008
1009 ClangASTImporter *
1010 GetClangASTImporter();
1011
779 /// Gets the module for the main executable.
780 ///
781 /// Each process has a notion of a main executable that is the file
782 /// that will be executed or attached to. Executable files can have
783 /// dependent modules that are discovered from the object files, or
784 /// discovered at runtime as things are dynamically loaded.
785 ///
786 /// @return

--- 249 unchanged lines hidden (view full) ---

1036 GetImageSearchPathList ();
1037
1038 ClangASTContext *
1039 GetScratchClangASTContext(bool create_on_demand=true);
1040
1041 ClangASTImporter *
1042 GetClangASTImporter();
1043
1044 //----------------------------------------------------------------------
1045 // Install any files through the platform that need be to installed
1046 // prior to launching or attaching.
1047 //----------------------------------------------------------------------
1048 Error
1049 Install(ProcessLaunchInfo *launch_info);
1012
1013 // Since expressions results can persist beyond the lifetime of a process,
1014 // and the const expression results are available after a process is gone,
1015 // we provide a way for expressions to be evaluated from the Target itself.
1016 // If an expression is going to be run, then it should have a frame filled
1017 // in in th execution context.
1018 ExecutionResults
1019 EvaluateExpression (const char *expression,

--- 232 unchanged lines hidden ---
1050
1051 // Since expressions results can persist beyond the lifetime of a process,
1052 // and the const expression results are available after a process is gone,
1053 // we provide a way for expressions to be evaluated from the Target itself.
1054 // If an expression is going to be run, then it should have a frame filled
1055 // in in th execution context.
1056 ExecutionResults
1057 EvaluateExpression (const char *expression,

--- 232 unchanged lines hidden ---