Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261098

Add clhsdb "findsym" command

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b11

      Description

      There is currently no way to map a native symbol to its address, which is basically the opposite of what "findpc" does. It's very easy to add that support:

             new Command("findsym", "findsym name", false) {
                 public void doit(Tokens t) {
                     if (t.countTokens() != 1) {
                         usage();
                     } else {
                            out.println(VM.getVM().getDebugger().lookup(null, t.nextToken()));
                     }
                 }
             },

      And this is what it allows you to do:

      hsdb> findsym MaxJNILocalCapacity
      0x00007f3c3def6e20
      hsdb> findpc 0x00007f3c3def6e20
      Address 0x00007f3c3def6e20: MaxJNILocalCapacity
      hsdb> examine 0x00007f3c3def6e20
      0x00007f3c3def6e20: 0x0000000000010000

      And 0x10000 is indeed the default value for MaxJNILocalCapacity as seen in globals.hpp:

        product(intx, MaxJNILocalCapacity, 65536, \

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cjplummer Chris Plummer
              Reporter:
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: