From 33ebda9d6841e18d9ef18b94c3dcad7d0498ab3d Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 9 Mar 2015 11:58:10 +0000 Subject: [PATCH] gdbserver/tracepoint.c: make exported IPA global int instead of enum MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes another C++ -fpermissive error: src/gdb/gdbserver/tracepoint.c:4535:21: error: invalid conversion from ‘int’ to ‘eval_result_type’ [-fpermissive] expr_eval_result = ipa_expr_eval_result; gdb/gdbserver/ChangeLog: 2015-08-06 Pedro Alves * tracepoint.c (expr_eval_result): Now an int. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/tracepoint.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 5f0841779fc..4f64e43cbcb 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2015-08-06 Pedro Alves + + * tracepoint.c (expr_eval_result): Now an int. + 2015-08-06 Pedro Alves * gdbthread.h (struct regcache): Forward declare. diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index e1c4a45aced..4455084e7e1 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -848,7 +848,10 @@ IP_AGENT_EXPORT_VAR int trace_buffer_is_full; /* The first error that occurred during expression evaluation. */ -IP_AGENT_EXPORT_VAR enum eval_result_type expr_eval_result = expr_eval_no_error; +/* Stored as an int to avoid the IPA ABI being dependent on whatever + the compiler decides to use for the enum's underlying type. Holds + enum eval_result_type values. */ +IP_AGENT_EXPORT_VAR int expr_eval_result = expr_eval_no_error; EXTERN_C_POP -- 2.30.2