Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
 public Breakpoint Find( BiosFunctionToken function )
 {
     Breakpoint breakpoint;
     if( _biosBreakpointLookup.TryGetValue( function, out breakpoint ) == true )
         return breakpoint;
     else
         return null;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }