using System;
using System.Runtime.InteropServices;
namespace System.Diagnostics
{
/// Modifies code generation for runtime just-in-time (JIT) debugging. This class cannot be inherited.
/// 1
// Token: 0x0200015A RID: 346
[ComVisible(true)]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
public sealed class DebuggableAttribute : Attribute
{
/// Initializes a new instance of the class, using the specified tracking and optimization options for the just-in-time (JIT) compiler.
/// true to enable debugging; otherwise, false.
/// true to disable the optimizer for execution; otherwise, false.
// Token: 0x06001128 RID: 4392 RVA: 0x00044F6C File Offset: 0x0004316C
public DebuggableAttribute(bool isJITTrackingEnabled, bool isJITOptimizerDisabled)
{
this.JITTrackingEnabledFlag = isJITTrackingEnabled;
this.JITOptimizerDisabledFlag = isJITOptimizerDisabled;
if (isJITTrackingEnabled)
{
this.debuggingModes |= DebuggableAttribute.DebuggingModes.Default;
}
if (isJITOptimizerDisabled)
{
this.debuggingModes |= DebuggableAttribute.DebuggingModes.DisableOptimizations;
}
}
/// Initializes a new instance of the class, using the specified debugging modes for the just-in-time (JIT) compiler.
/// A bitwise combination of the values specifying the debugging mode for the JIT compiler.
// Token: 0x06001129 RID: 4393 RVA: 0x00044FBC File Offset: 0x000431BC
public DebuggableAttribute(DebuggableAttribute.DebuggingModes modes)
{
this.debuggingModes = modes;
this.JITTrackingEnabledFlag = (this.debuggingModes & DebuggableAttribute.DebuggingModes.Default) != DebuggableAttribute.DebuggingModes.None;
this.JITOptimizerDisabledFlag = (this.debuggingModes & DebuggableAttribute.DebuggingModes.DisableOptimizations) != DebuggableAttribute.DebuggingModes.None;
}
/// Gets the debugging modes for the attribute.
/// A bitwise combination of the values describing the debugging mode for the just-in-time (JIT) compiler. The default is .
/// 2
// Token: 0x170002E8 RID: 744
// (get) Token: 0x0600112A RID: 4394 RVA: 0x00044FF8 File Offset: 0x000431F8
public DebuggableAttribute.DebuggingModes DebuggingFlags
{
get
{
return this.debuggingModes;
}
}
/// Gets a value that indicates whether the runtime will track information during code generation for the debugger.
/// true if the runtime will track information during code generation for the debugger; otherwise, false.
/// 2
// Token: 0x170002E9 RID: 745
// (get) Token: 0x0600112B RID: 4395 RVA: 0x00045000 File Offset: 0x00043200
public bool IsJITTrackingEnabled
{
get
{
return this.JITTrackingEnabledFlag;
}
}
/// Gets a value that indicates whether the runtime optimizer is disabled.
/// true if the runtime optimizer is disabled; otherwise, false.
/// 2
// Token: 0x170002EA RID: 746
// (get) Token: 0x0600112C RID: 4396 RVA: 0x00045008 File Offset: 0x00043208
public bool IsJITOptimizerDisabled
{
get
{
return this.JITOptimizerDisabledFlag;
}
}
// Token: 0x04000438 RID: 1080
private bool JITTrackingEnabledFlag;
// Token: 0x04000439 RID: 1081
private bool JITOptimizerDisabledFlag;
// Token: 0x0400043A RID: 1082
private DebuggableAttribute.DebuggingModes debuggingModes;
/// Specifies the debugging mode for the just-in-time (JIT) compiler.
// Token: 0x0200015B RID: 347
[ComVisible(true)]
[Flags]
public enum DebuggingModes
{
/// In the .NET Framework version 2.0, JIT tracking information is always generated, and this flag has the same effect as with the exception of the property being false, which has no meaning in version 2.0.
// Token: 0x0400043C RID: 1084
None = 0,
/// Instructs the just-in-time (JIT) compiler to use its default behavior, which includes enabling optimizations, disabling Edit and Continue support, and using symbol store sequence points if present. In the .NET Framework version 2.0, JIT tracking information, the Microsoft intermediate language (MSIL) offset to the native-code offset within a method, is always generated.
// Token: 0x0400043D RID: 1085
Default = 1,
/// Use the implicit MSIL sequence points, not the program database (PDB) sequence points. The symbolic information normally includes at least one Microsoft intermediate language (MSIL) offset for each source line. When the just-in-time (JIT) compiler is about to compile a method, it asks the profiling services for a list of MSIL offsets that should be preserved. These MSIL offsets are called sequence points.
// Token: 0x0400043E RID: 1086
IgnoreSymbolStoreSequencePoints = 2,
/// Enable edit and continue. Edit and continue enables you to make changes to your source code while your program is in break mode. The ability to edit and continue is compiler dependent.
// Token: 0x0400043F RID: 1087
EnableEditAndContinue = 4,
/// Disable optimizations performed by the compiler to make your output file smaller, faster, and more efficient. Optimizations result in code rearrangement in the output file, which can make debugging difficult. Typically optimization should be disabled while debugging.
// Token: 0x04000440 RID: 1088
DisableOptimizations = 256
}
}
}