From patchwork Fri Aug 21 23:00:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 8388 Received: (qmail 26137 invoked by alias); 21 Aug 2015 23:00:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26127 invoked by uid 89); 21 Aug 2015 23:00:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 21 Aug 2015 23:00:44 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 94BB391FE3 for ; Fri, 21 Aug 2015 23:00:43 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7LN0gvk024329 for ; Fri, 21 Aug 2015 19:00:42 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [ob/pushed] Fix ax.c:gdb_eval_agent_expr Date: Sat, 22 Aug 2015 00:00:41 +0100 Message-Id: <1440198041-25804-1-git-send-email-palves@redhat.com> MIME-Version: 1.0 In C++ mode: src/gdb/gdbserver/ax.c: In function ‘eval_result_type gdb_eval_agent_expr(eval_agent_expr_context*, agent_expr*, ULONGEST*)’: src/gdb/gdbserver/ax.c:1335:11: error: invalid conversion from ‘int’ to ‘eval_result_type’ [-fpermissive] return 1; ^ "1" as an enum eval_result_type is expr_eval_empty_expression, but clearly this wants to return expr_eval_unhandled_opcode. gdb/gdbserver/ChangeLog: 2015-08-21 Pedro Alves * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode instead of literal 1. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/ax.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 6103287..cd5e046 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2015-08-21 Pedro Alves + * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode + instead of literal 1. + +2015-08-21 Pedro Alves + * tdesc.c (default_description): Explicitly zero-initialize. 2015-08-21 Pedro Alves diff --git a/gdb/gdbserver/ax.c b/gdb/gdbserver/ax.c index c5b65fa..f94a27d 100644 --- a/gdb/gdbserver/ax.c +++ b/gdb/gdbserver/ax.c @@ -1332,7 +1332,7 @@ gdb_eval_agent_expr (struct eval_agent_expr_context *ctx, op); /* If ever GDB generates any of these, we don't have the option of ignoring. */ - return 1; + return expr_eval_unhandled_opcode; default: ax_debug ("Agent expression op 0x%x not recognized", op);