RFR: 8261098: Add clhsdb "findsym" command [v2]
Chris Plummer
cjplummer at openjdk.java.net
Wed Feb 17 02:12:56 UTC 2021
On Tue, 16 Feb 2021 22:24:19 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> lookup_symbol implementation contains FIXME comment about object_name.
>> I suppose you want to make this argument ignorance permanent. Then I think this FIXME should be removed (or updated) and it would be nice to add comment about this to lookup_symbol declaration (or maybe it would be better to delete this argument)
>
> If the FIXME in `lookup_symbol` was ever addressed, then we would need for NULL to mean to search all libraries. I suppose in that case it would make sense for AutoJavaString to do as you suggested. It looks like Windows also has an AutoJavaString. I'll change it also, but it is never passed NULL. The Bsd version is, but it handles the GetStringUTFChars() inline without AutoJavaString, and it does support NULL already:
>
> objectName_cstr = NULL;
> if (objectName != NULL) {
> objectName_cstr = (*env)->GetStringUTFChars(env, objectName, &isCopy);
> CHECK_EXCEPTION_(0);
> }
> ...
> addr = (jlong) lookup_symbol(ph, objectName_cstr, symbolName_cstr);
I've pushed the AutoJavaString change.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2567
More information about the serviceability-dev
mailing list