On Tue, 16 Feb 2021 01:26:46 GMT, Chris Plummer <[email protected]> wrote:
>> src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp line 350: >> >>> 348: // Note, objectName is ignored, and may in fact be NULL. >>> 349: // lookup_symbol will always search all objects/libs >>> 350: //AutoJavaString objectName_cstr(env, objectName); >> >> I think it would be better to update AutoJavaString class to handle null >> strings: >> `m_buf(str == NULL ? NULL : env->GetStringUTFChars(str, NULL)) ` > > The point is the argument is ignored, so it doesn't really matter if > AutoJavaString can handle NULL. I assume with your suggested fix that also > want me to pass objectName_cstr to lookup_symbol() rather than an explicit > NULL. I wanted the NULL to be explicit to help further convey that objectName > is ignored. 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) ------------- PR: https://git.openjdk.java.net/jdk/pull/2567
