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

Add clhsdb "findsym" command

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 17
    • 17
    • hotspot
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: