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, \
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, \
- csr for
-
JDK-8261101 Add clhsdb "findsym" command
-
- Closed
-
- is blocked by
-
JDK-8261692 Bugs in clhsdb history support
-
- Resolved
-
- relates to
-
JDK-8263242 serviceability/sa/ClhsdbFindPC.java cannot find MaxJNILocalCapacity with ASLR
-
- Resolved
-
-
JDK-8263546 Add "findsym" command to clhsdb.html help file
-
- Resolved
-
-
JDK-8247514 Improve clhsdb 'findpc' ability to determine what an address points to by improving PointerFinder and PointerLocation classes
-
- Resolved
-
(2 links to)