sun.jvm.hotspot.debugger.cdbg.ClosestSymbol Java Examples

The following examples show how to use sun.jvm.hotspot.debugger.cdbg.ClosestSymbol. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InstanceConstructor.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #2
Source File: InstanceConstructor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #3
Source File: LinuxDebuggerLocal.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #4
Source File: InstanceConstructor.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #5
Source File: LinuxDebuggerLocal.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #6
Source File: BsdDebuggerLocal.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #7
Source File: BsdDebuggerLocal.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #8
Source File: InstanceConstructor.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #9
Source File: LinuxDebuggerLocal.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #10
Source File: BsdDebuggerLocal.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #11
Source File: BsdDebuggerLocal.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #12
Source File: LinuxDebuggerLocal.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #13
Source File: InstanceConstructor.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #14
Source File: LinuxDebuggerLocal.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #15
Source File: BsdDebuggerLocal.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #16
Source File: LinuxDebuggerLocal.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #17
Source File: BsdDebuggerLocal.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #18
Source File: BsdDebuggerLocal.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #19
Source File: InstanceConstructor.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #20
Source File: InstanceConstructor.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #21
Source File: LinuxDebuggerLocal.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #22
Source File: LinuxDebuggerLocal.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** From the LinuxCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(LinuxDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #23
Source File: BsdDebuggerLocal.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** From the BsdCDebugger interface */
public synchronized ClosestSymbol lookup(long addr) {
   requireAttach();
   if (isCore) {
      return lookupByAddress0(addr);
   } else {
      class LookupByAddressTask implements WorkerThreadTask {
         long addr;
         ClosestSymbol result;

         public void doit(BsdDebuggerLocal debugger) {
             result = debugger.lookupByAddress0(addr);
         }
      }

      LookupByAddressTask task = new LookupByAddressTask();
      task.addr = addr;
      workerThread.execute(task);
      return task.result;
   }
}
 
Example #24
Source File: InstanceConstructor.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected WrongTypeException newWrongTypeException(Address addr) {
  String message = "No suitable match for type of address " + addr;
  CDebugger cdbg = VM.getVM().getDebugger().getCDebugger();
  if (cdbg != null) {
    // Most common case: V-table pointer is the first field
    Address vtblPtr = addr.getAddressAt(0);
    LoadObject lo = cdbg.loadObjectContainingPC(vtblPtr);
    if (lo != null) {
      ClosestSymbol symbol = lo.closestSymbolToPC(vtblPtr);
      if (symbol != null) {
        message += " (nearest symbol is " + symbol.getName() + ")";
      }
    }
  }

  return new WrongTypeException(message);
}
 
Example #25
Source File: BsdDebuggerLocal.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private native ClosestSymbol lookupByAddress0(long address)
throws DebuggerException;
 
Example #26
Source File: LinuxDebuggerLocal.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private ClosestSymbol createClosestSymbol(String name, long offset) {
   return new ClosestSymbol(name, offset);
}
 
Example #27
Source File: LinuxDebuggerLocal.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private native ClosestSymbol lookupByAddress0(long address)
throws DebuggerException;
 
Example #28
Source File: BsdDebuggerLocal.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private ClosestSymbol createClosestSymbol(String name, long offset) {
   return new ClosestSymbol(name, offset);
}
 
Example #29
Source File: BsdDebuggerLocal.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private ClosestSymbol createClosestSymbol(String name, long offset) {
   return new ClosestSymbol(name, offset);
}
 
Example #30
Source File: BsdDebuggerLocal.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private native ClosestSymbol lookupByAddress0(long address)
throws DebuggerException;