[PATCH] syntax error in jdwpTransport.h
小破
1052156701 at qq.com
Sun Nov 6 06:33:44 UTC 2022
Bug description
The code in jdwpTransport.h has syntax error.
For example, use `g++ -c jdwpTransport.h` to compile it, this error message will be produced:
-----------------------------------------------------------------------
jdwpTransport.h:266:9: error: expected identifier before 'return'
return functions->SetTransportConfiguration(this, config);
^~~~~~
jdwpTransport.h:266:9: error: expected ',' or '...' before 'return'
jdwpTransport.h:266:66: error: expected ')' before ';' token
return functions->SetTransportConfiguration(this, config);
^
jdwpTransport.h:267:5: error: expected ';' after struct definition
}
^
jdwpTransport.h:273:1: error: expected declaration before '}' token
} /* extern "C" */
^
------------------------------------------------------------------------
Bug fix
The bug is caused by the wrong signature of method `SetTransportConfiguration(jdwpTransportEnv* env,`.
So, I correct the method signature to `SetTransportConfiguration(jdwpTransportConfiguration *config)`.
Git diff
-------------------------------------------------------------------
diff --git a/src/jdk.jdwp.agent/share/native/include/jdwpTransport.h b/src/jdk.jdwp.agent/share/native/include/jdwpTransport.h
index cdbd04d429c..642d167a230 100644
--- a/src/jdk.jdwp.agent/share/native/include/jdwpTransport.h
+++ b/src/jdk.jdwp.agent/share/native/include/jdwpTransport.h
@@ -262,7 +262,7 @@ struct _jdwpTransportEnv {
}
/* SetTransportConfiguration added in JDWPTRANSPORT_VERSION_1_1 */
- jdwpTransportError SetTransportConfiguration(jdwpTransportEnv* env,
+ jdwpTransportError SetTransportConfiguration(jdwpTransportConfiguration *config) {
return functions->SetTransportConfiguration(this, config);
}
----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/serviceability-dev/attachments/20221106/4f8165fa/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src.zip
Type: application/octet-stream
Size: 3398 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/serviceability-dev/attachments/20221106/4f8165fa/src-0001.zip>
More information about the serviceability-dev
mailing list