示例#1
0
 public BiosFunction FindFunction( BiosFunctionToken token )
 {
     // It's possible that a NID could be 0x0, but whatever :)
     // It's also possible that there are the same NID in multiple modules.... whatever
     if( token.NID != 0x0 )
     {
         return this.FindFunction( token.NID );
     }
     else
     {
         BiosModule module = this.FindModule( token.ModuleName );
         if( module == null )
             return null;
         // This is lame - if this is used a lot, we need a better lookup!
         foreach( StubExport export in module.Exports )
         {
             BiosFunction target = this.FindFunction( export.NID );
             if( ( target != null ) &&
                 ( target.Name == token.MethodName ) )
                 return target;
         }
         return null;
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new <see cref="Breakpoint"/> instance with the given parameters.
 /// </summary>
 /// <param name="id">A unique ID used to lookup the breakpoint.</param>
 /// <param name="function">The BIOS function to break on.</param>
 public Breakpoint(int id, BiosFunctionToken function)
     : this(id, BreakpointType.BiosFunction)
 {
     this.Function = function;
 }
示例#3
0
 /// <summary>
 /// Initializes a new <see cref="Method"/> instance with the given parameters.
 /// </summary>
 /// <param name="moduleId">The ID of the module the symbol resides in.</param>
 /// <param name="type">The type of the method.</param>
 /// <param name="address">The start address of the method.</param>
 /// <param name="length">The length of the method, in bytes.</param>
 /// <param name="function">The BIOS function, if available.</param>
 public Method(uint moduleId, MethodType type, uint address, uint length, BiosFunctionToken function)
     : this(moduleId, type, address, length)
 {
     this.Function = function;
 }
示例#4
0
 public Breakpoint Find( BiosFunctionToken function )
 {
     Breakpoint breakpoint;
     if( _biosBreakpointLookup.TryGetValue( function, out breakpoint ) == true )
         return breakpoint;
     else
         return null;
 }
示例#5
0
 /// <summary>
 /// Initializes a new <see cref="Breakpoint"/> instance with the given parameters.
 /// </summary>
 /// <param name="id">A unique ID used to lookup the breakpoint.</param>
 /// <param name="function">The BIOS function to break on.</param>
 public Breakpoint( int id, BiosFunctionToken function )
     : this(id, BreakpointType.BiosFunction)
 {
     this.Function = function;
 }
示例#6
0
 /// <summary>
 /// Initializes a new <see cref="Method"/> instance with the given parameters.
 /// </summary>
 /// <param name="moduleId">The ID of the module the symbol resides in.</param>
 /// <param name="type">The type of the method.</param>
 /// <param name="address">The start address of the method.</param>
 /// <param name="length">The length of the method, in bytes.</param>
 /// <param name="function">The BIOS function, if available.</param>
 public Method( uint moduleId, MethodType type, uint address, uint length, BiosFunctionToken function )
     : this(moduleId, type, address, length)
 {
     this.Function = function;
 }