DebugDatabase Class Fling OS
Provides a set of managed methods to interface to the Fling OS debug database.

To Do's:

  • To do - Add an invisble caching mechanism.
  • To do - Extend the invisible caching mechanism to adds/removes to improve efficiency.
  • To do - Use InsertAllOnSubmit / DeleteAllOnSubmit with caching mechanism if they are faster / more efficient.
  • To do - Create extra Add methods that take required fields as arguments to increase ease of coding elsewhere / reduce code duplication.
Inheritance Hierarchy

System Object
  Kernel.Debug.Data DebugDatabase

Namespace: Kernel.Debug.Data
Assembly: Kernel.Debug.Data (in Kernel.Debug.Data.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax

public static class DebugDatabase

The DebugDatabase type exposes the following members.

Constructors

  NameDescription
Private methodStatic memberDebugDatabase
Top
Methods

  NameDescription
Public methodStatic memberAddArgument
Adds the pre-created argument to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddComplexTypeLink
Adds the pre-created complex type link to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddILOpInfo
Adds the pre-created IL op info to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddLocalVariable
Adds the pre-created local variable to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddMethod
Adds the pre-created method to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's:

  • To do - Add validation of fields and throw a pre-emptive exception if any invalid or missing data is found.
  • To do - Check whether changes must be submitted before the GetMethod(String) method can return methods added by Add.
Public methodStatic memberAddStaticField
Adds the pre-created static field to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddStringLiteral
Adds the pre-created string literal to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberAddType
Adds the pre-created type to the database. All the entries's required parameters (i.e. ones which cannot be null) should be set.

To Do's: See AddMethod(DB_Method)'s to do's.

Public methodStatic memberEmpty
Empties all the database's tables.
Public methodStatic memberGetArgument
Gets the specified argument from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetComplexTypeLink
Gets the specified complex type link from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetILOpInfo
Gets the specified IL op info from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetLocalVariable
Gets the specified local variable from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetMethod
Gets the specified method from the database.

To Do's:

  • To do - Caching mechanism.
Public methodStatic memberGetStaticField
Gets the specified static field from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetStringLiteral
Gets the specified string literal from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetType(Guid)
Gets the specified type from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberGetType(String)
Gets the specified type from the database.

To Do's: See GetMethod(String)'s to do's.

Public methodStatic memberRemoveArgument
Removes the specified argument from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveComplexTypeLink
Removes the specified complex type link from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveILOpInfo
Removes the specified IL op info from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveLocalVariable
Removes the specified local variable from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveMethod
Removes the specified method from the database.

To Do's:

  • To do - Check for entries in other tables that link to the one being deleted. If the dependent entries are not being deleted, throw an error.
  • To do - Add an option to automatically delete dependent entries.
Public methodStatic memberRemoveStaticField
Removes the specified static field from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveStringLiteral
Removes the specified string literal from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberRemoveType
Removes the specified type from the database.

To Do's: See RemoveMethod(DB_Method)'s to do's.

Public methodStatic memberSubmitChanges
Submits all changes to the database.
Top
Fields

  NameDescription
Private fieldStatic memberDB
The underlying data context (generated by the VS designer) used to access the local Debug Database.
Top
Remarks

The output database has a fixed path. It is not any of the output databases in the output directories of this project or any referenced projects.

The data in the output database can be viewed directly in VS2013.

Steps for viewing debug database entries in VS2013

  1. Open the server explorer - Open the server explorer by going to View -> Server Explorer
  2. Add Connection... - Right click on Data Connections and choose "Add Connection..."
  3. Change the Data Source - Change the Data Source to "Microsoft SQL Server Database File".
  4. Select the database file - Browse for and select the debug database file.
  5. Done! - Done! Browse the data in the database as normal.

To modify the debug database structure (e.g. tables), add a connection (as above) to the Database.mdf file in this project. Then double click on any table to modify its structure and use the standard "Update table" features.

Examples

Adding a new entry to the Methods table. Note: No data is submitted to the database until DebugDatabase.SubmitChanges() is called.
1DB_Method dbMethod = new DB_Method();
2dbMethod.Id = MethodID;
3dbMethod.MethodSignature = methodSignature;
4dbMethod.Plugged = false;
5dbMethod.ASMStartPos = -1;
6dbMethod.ASMEndPos = -1;
7DebugDatabase.AddMethod(dbMethod);
See Also