Exemplo n.º 1
0
	MethodInfo* DebugCLI::functionFor(SourceInfo* src, int line)
	{
		MethodInfo* info = NULL;
		if (src)
		{
			// find the function at this location
			int size = src->functionCount();
			for(int i=0; i<size; i++)
			{
				MethodInfo* m = src->functionAt(i);
				if (line >= m->firstSourceLine() && line <= m->lastSourceLine())
				{
					info = m;
					break;
				}
			}
		}
		return info;
	}
Exemplo n.º 2
0
 MethodInfo* Debugger::functionFor(SourceInfo* src, int line, DebugStackFrame* frame)
 {
     MethodInfo* info = NULL;
     if (src)
     {
         // find the function at this location
         int size = src->functionCount();
         for(int i=0; i<size; i++)
         {
             MethodInfo* m = src->functionAt(i);
             if (line >= m->firstSourceLine() && line <= m->lastSourceLine())
             {
                  info = m;
                  break;
             }
         }
     }
     if (!info && frame) {
          // fallback on frame info
          return frame->trace->info();
     }
     return info;
 }