public int pcToLine(int pc) {
    /*
     * Line number entries don't have to appear in any particular
     * order, so we have to do a linear search. TODO: If
     * this turns out to be a bottleneck, consider sorting the
     * list prior to use.
     */
    int sz = size();
    int bestPc = -1;
    int bestLine = -1;

    for (int i = 0; i < sz; i++) {
      Item one = get(i);
      int onePc = one.getStartPc();
      if ((onePc <= pc) && (onePc > bestPc)) {
        bestPc = onePc;
        bestLine = one.getLineNumber();
        if (bestPc == pc) {
          // We can't do better than this
          break;
        }
      }
    }

    return bestLine;
  }
Gets the line number associated with the given address.

@param pc {@code >= 0;} the address to look up
@return {@code >= -1;} the associated line number, or {@code -1} if none is known
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/LineNumberList.java