Skip to content

Commit c774741

Browse files
committed
8255695: Some JVMTI calls in the jdwp debug agent are using FUNC_PTR instead of JVMTI_FUNC_PTR
Reviewed-by: sspitsyn, amenkov
1 parent bee864f commit c774741

File tree

1 file changed

+14
-14
lines changed
  • src/jdk.jdwp.agent/share/native/libjdwp

1 file changed

+14
-14
lines changed

src/jdk.jdwp.agent/share/native/libjdwp/util.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,12 @@ methodClass(jmethodID method, jclass *pclazz)
699699
jvmtiError error;
700700

701701
*pclazz = NULL;
702-
error = FUNC_PTR(gdata->jvmti,GetMethodDeclaringClass)
702+
error = JVMTI_FUNC_PTR(gdata->jvmti,GetMethodDeclaringClass)
703703
(gdata->jvmti, method, pclazz);
704704
return error;
705705
}
706706

707-
/* Returns a local ref to the declaring class for a method, or NULL. */
707+
/* Returns the start and end locations of the specified method. */
708708
jvmtiError
709709
methodLocation(jmethodID method, jlocation *ploc1, jlocation *ploc2)
710710
{
@@ -727,7 +727,7 @@ methodSignature(jmethodID method,
727727
char *signature = NULL;
728728
char *generic_signature = NULL;
729729

730-
error = FUNC_PTR(gdata->jvmti,GetMethodName)
730+
error = JVMTI_FUNC_PTR(gdata->jvmti,GetMethodName)
731731
(gdata->jvmti, method, &name, &signature, &generic_signature);
732732

733733
if ( pname != NULL ) {
@@ -1009,7 +1009,7 @@ debugMonitorEnter(jrawMonitorID monitor)
10091009
{
10101010
jvmtiError error;
10111011
while (JNI_TRUE) {
1012-
error = FUNC_PTR(gdata->jvmti,RawMonitorEnter)
1012+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorEnter)
10131013
(gdata->jvmti, monitor);
10141014
error = ignore_vm_death(error);
10151015
if (error == JVMTI_ERROR_INTERRUPT) {
@@ -1028,7 +1028,7 @@ debugMonitorExit(jrawMonitorID monitor)
10281028
{
10291029
jvmtiError error;
10301030

1031-
error = FUNC_PTR(gdata->jvmti,RawMonitorExit)
1031+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorExit)
10321032
(gdata->jvmti, monitor);
10331033
error = ignore_vm_death(error);
10341034
if (error != JVMTI_ERROR_NONE) {
@@ -1040,7 +1040,7 @@ void
10401040
debugMonitorWait(jrawMonitorID monitor)
10411041
{
10421042
jvmtiError error;
1043-
error = FUNC_PTR(gdata->jvmti,RawMonitorWait)
1043+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorWait)
10441044
(gdata->jvmti, monitor, ((jlong)(-1)));
10451045

10461046
/*
@@ -1085,7 +1085,7 @@ void
10851085
debugMonitorTimedWait(jrawMonitorID monitor, jlong millis)
10861086
{
10871087
jvmtiError error;
1088-
error = FUNC_PTR(gdata->jvmti,RawMonitorWait)
1088+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorWait)
10891089
(gdata->jvmti, monitor, millis);
10901090
if (error == JVMTI_ERROR_INTERRUPT) {
10911091
/* See comment above */
@@ -1103,7 +1103,7 @@ debugMonitorNotify(jrawMonitorID monitor)
11031103
{
11041104
jvmtiError error;
11051105

1106-
error = FUNC_PTR(gdata->jvmti,RawMonitorNotify)
1106+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorNotify)
11071107
(gdata->jvmti, monitor);
11081108
error = ignore_vm_death(error);
11091109
if (error != JVMTI_ERROR_NONE) {
@@ -1116,7 +1116,7 @@ debugMonitorNotifyAll(jrawMonitorID monitor)
11161116
{
11171117
jvmtiError error;
11181118

1119-
error = FUNC_PTR(gdata->jvmti,RawMonitorNotifyAll)
1119+
error = JVMTI_FUNC_PTR(gdata->jvmti,RawMonitorNotifyAll)
11201120
(gdata->jvmti, monitor);
11211121
error = ignore_vm_death(error);
11221122
if (error != JVMTI_ERROR_NONE) {
@@ -1130,7 +1130,7 @@ debugMonitorCreate(char *name)
11301130
jrawMonitorID monitor;
11311131
jvmtiError error;
11321132

1133-
error = FUNC_PTR(gdata->jvmti,CreateRawMonitor)
1133+
error = JVMTI_FUNC_PTR(gdata->jvmti,CreateRawMonitor)
11341134
(gdata->jvmti, name, &monitor);
11351135
if (error != JVMTI_ERROR_NONE) {
11361136
EXIT_ERROR(error, "on creation of a raw monitor");
@@ -1143,7 +1143,7 @@ debugMonitorDestroy(jrawMonitorID monitor)
11431143
{
11441144
jvmtiError error;
11451145

1146-
error = FUNC_PTR(gdata->jvmti,DestroyRawMonitor)
1146+
error = JVMTI_FUNC_PTR(gdata->jvmti,DestroyRawMonitor)
11471147
(gdata->jvmti, monitor);
11481148
error = ignore_vm_death(error);
11491149
if (error != JVMTI_ERROR_NONE) {
@@ -1202,7 +1202,7 @@ classSignature(jclass clazz, char **psignature, char **pgeneric_signature)
12021202
* pgeneric_signature can be NULL, and GetClassSignature
12031203
* accepts NULL.
12041204
*/
1205-
error = FUNC_PTR(gdata->jvmti,GetClassSignature)
1205+
error = JVMTI_FUNC_PTR(gdata->jvmti,GetClassSignature)
12061206
(gdata->jvmti, clazz, &signature, pgeneric_signature);
12071207

12081208
if ( psignature != NULL ) {
@@ -1774,7 +1774,7 @@ jvmtiAllocate(jint numBytes)
17741774
if ( numBytes == 0 ) {
17751775
return NULL;
17761776
}
1777-
error = FUNC_PTR(gdata->jvmti,Allocate)
1777+
error = JVMTI_FUNC_PTR(gdata->jvmti,Allocate)
17781778
(gdata->jvmti, numBytes, (unsigned char**)&ptr);
17791779
if (error != JVMTI_ERROR_NONE ) {
17801780
EXIT_ERROR(error, "Can't allocate jvmti memory");
@@ -1789,7 +1789,7 @@ jvmtiDeallocate(void *ptr)
17891789
if ( ptr == NULL ) {
17901790
return;
17911791
}
1792-
error = FUNC_PTR(gdata->jvmti,Deallocate)
1792+
error = JVMTI_FUNC_PTR(gdata->jvmti,Deallocate)
17931793
(gdata->jvmti, ptr);
17941794
if (error != JVMTI_ERROR_NONE ) {
17951795
EXIT_ERROR(error, "Can't deallocate jvmti memory");

0 commit comments

Comments
 (0)