public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  tromey/operator-new-delete: fix a bug in gnuv3_call_array_new
@ 2013-05-17 20:08 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2013-05-17 20:08 UTC (permalink / raw)
  To: archer-commits

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 <tromey@redhat.com>
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 <tromey@redhat.com>
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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-17 20:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 20:08 [SCM] tromey/operator-new-delete: fix a bug in gnuv3_call_array_new tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).