From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16438 invoked by alias); 17 May 2013 20:08:23 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 16419 invoked by uid 306); 17 May 2013 20:08:22 -0000 Date: Fri, 17 May 2013 20:08:00 -0000 Message-ID: <20130517200822.16390.qmail@sourceware.org> From: tromey@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] tromey/operator-new-delete: fix a bug in gnuv3_call_array_new X-Git-Refname: refs/heads/tromey/operator-new-delete X-Git-Reftype: branch X-Git-Oldrev: a414a7d85eead87ae525c2a5400f05322d62a43d X-Git-Newrev: 38c177bfdb912cfca345ffdc72c902a3176b36d6 X-SW-Source: 2013-q2/txt/msg00078.txt.bz2 List-Id: The branch, tromey/operator-new-delete has been updated via 38c177bfdb912cfca345ffdc72c902a3176b36d6 (commit) via 96b615d6f818c29c04d1447c7e2a997f70942733 (commit) from a414a7d85eead87ae525c2a5400f05322d62a43d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 38c177bfdb912cfca345ffdc72c902a3176b36d6 Author: Tom Tromey Date: Fri May 17 14:08:16 2013 -0600 fix a bug in gnuv3_call_array_new this bug prevented the array length from being stored commit 96b615d6f818c29c04d1447c7e2a997f70942733 Author: Tom Tromey Date: Fri May 17 13:53:06 2013 -0600 add a note ----------------------------------------------------------------------- Summary of changes: README.archer | 1 + gdb/gnu-v3-abi.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) First 500 lines of diff: diff --git a/README.archer b/README.archer index 15cdc67..a328b6f 100644 --- a/README.archer +++ b/README.archer @@ -16,6 +16,7 @@ It is incomplete: when is this called? * No cookie is required if the new operator being used is ::operator new[](size_t, void*). + but we don't currently make a cookie for new Simple[7] * syntax for calling a destructor explicitly do we need to handle this specially? cannot be used with an implicit "this", must always be qualified diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 8de9f09..31324c5 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -1374,7 +1374,6 @@ gnuv3_call_array_new (LONGEST elt_size, LONGEST elt_count, int include_size, has_destructor = 0; struct type *elt_type; - for (elt_type = type; TYPE_CODE (elt_type) == TYPE_CODE_ARRAY; elt_type = check_typedef (TYPE_TARGET_TYPE (elt_type))) @@ -1383,14 +1382,14 @@ gnuv3_call_array_new (LONGEST elt_size, LONGEST elt_count, { int i; - for (i = 0; !has_destructor && i < TYPE_NFN_FIELDS (type); ++i) + for (i = 0; !has_destructor && i < TYPE_NFN_FIELDS (elt_type); ++i) { - struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i); + struct fn_field *f = TYPE_FN_FIELDLIST1 (elt_type, i); int j; - for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (type, i); ++j) + for (j = 0; j < TYPE_FN_FIELDLIST_LENGTH (elt_type, i); ++j) { - if (TYPE_FN_FIELDLIST_NAME (type, i)[0] == '~' + if (TYPE_FN_FIELDLIST_NAME (elt_type, i)[0] == '~' || is_destructor_name (TYPE_FN_FIELD_PHYSNAME (f, j))) { has_destructor = 1; hooks/post-receive -- Repository for Project Archer.