From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2827 invoked by alias); 1 Apr 2016 15:14:31 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 2817 invoked by uid 89); 1 Apr 2016 15:14:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 01 Apr 2016 15:14:20 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] gdb: allow enumeration constants as second operand of BINOP_REPEAT From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 01 Apr 2016 15:14:00 -0000 X-SW-Source: 2016-q2/txt/msg00052.txt.bz2 *** TEST RESULTS FOR COMMIT cc63428a4c290772d99863aead457c29ee223dc5 *** Author: Artemiy Volkov Branch: master Commit: cc63428a4c290772d99863aead457c29ee223dc5 gdb: allow enumeration constants as second operand of BINOP_REPEAT This patch adds support for TYPE_CODE_ENUM values to be supplied as right-hand side operand of the BINOP_REPEAT (@) operator. The following should now work: enum { sz = 17 }; int main () { int arr[sz + 1] = { 0 }; return 0; /* line 9 here */ } (gdb) b 9 (gdb) r (gdb) p arr@sz $1 = {0 } (gdb) A couple of tests is also included in this patch to demonstrate that it is working as intended. gdb/Changelog: 2016-04-01 Artemiy Volkov PR gdb/19820 * eval.c (evaluate_subexp_standard): Allow TYPE_CODE_ENUM to be the type of BINOP_REPEAT's second operand. gdb/testsuite/Changelog: 2016-04-01 Artemiy Volkov PR gdb/19820 * gdb.base/printcmds.exp: Add artificial arrays tests.