[PATCH] syntax error in jdwpTransport.h
David Holmes
david.holmes at oracle.com
Sun Nov 6 21:44:07 UTC 2022
Thanks for the report I have filed:
https://bugs.openjdk.org/browse/JDK-8296445
for this.
Cheers,
David
On 6/11/2022 4:33 pm, 小破 wrote:
> *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);
> }
> ----------------------------------------------------------------------
>
More information about the serviceability-dev
mailing list