public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  master: Merge remote branch 'gdb/master'
Date: Tue, 14 Dec 2010 17:13:00 -0000	[thread overview]
Message-ID: <20101214171338.10643.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  38cdd2f1951b882ce68ff310f85e234a2450ddce (commit)
       via  a3568256dd143fe7badf11635b4607c26731325b (commit)
       via  9ece7f002e466d35387177497d5991e55ddd04d6 (commit)
      from  a3422d9d1cf66dbfd75f1139fe924aba4133afd9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 38cdd2f1951b882ce68ff310f85e234a2450ddce
Merge: a3422d9 a356825
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Dec 14 18:13:28 2010 +0100

    Merge remote branch 'gdb/master'

commit a3568256dd143fe7badf11635b4607c26731325b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Dec 14 14:50:41 2010 +0000

    Move gdb ChangeLog entry to gdb/ChangeLog.

commit 9ece7f002e466d35387177497d5991e55ddd04d6
Author: kwerner <kwerner>
Date:   Tue Dec 14 10:23:40 2010 +0000

    gdb:
    	* valops.c (value_one): Use get_array_bounds to compute the number
    	of array elements instead of dividing the length of the array by the
    	length of the element types.
    	* valarith.c (value_complement, value_neg): Likewise.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog  |    7 +++++++
 gdb/valarith.c |   16 ++++++++++++----
 gdb/valops.c   |    8 ++++++--
 3 files changed, 25 insertions(+), 6 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 379beb2..002f3d2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-14  Ken Werner  <ken.werner@de.ibm.com>
+
+	* valops.c (value_one): Use get_array_bounds to compute the number
+	of array elements instead of dividing the length of the array by the
+	length of the element types.
+	* valarith.c (value_complement, value_neg): Likewise.
+
 2010-12-14  Joel Brobecker  <brobecker@adacore.com>
 
 	* irix5-nat.c: Replace fp_r, fp_regs and fp_scr by __fp_r, __fp_regs
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 36e937d..6b212b2 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -1766,9 +1766,13 @@ value_neg (struct value *arg1)
     {
       struct value *tmp, *val = allocate_value (type);
       struct type *eltype = check_typedef (TYPE_TARGET_TYPE (type));
-      int i, n = TYPE_LENGTH (type) / TYPE_LENGTH (eltype);
+      int i;
+      LONGEST low_bound, high_bound;
 
-      for (i = 0; i < n; i++)
+      if (!get_array_bounds (type, &low_bound, &high_bound))
+	error (_("Could not determine the vector bounds"));
+
+      for (i = 0; i < high_bound - low_bound + 1; i++)
 	{
 	  tmp = value_neg (value_subscript (arg1, i));
 	  memcpy (value_contents_writeable (val) + i * TYPE_LENGTH (eltype),
@@ -1798,10 +1802,14 @@ value_complement (struct value *arg1)
     {
       struct value *tmp;
       struct type *eltype = check_typedef (TYPE_TARGET_TYPE (type));
-      int i, n = TYPE_LENGTH (type) / TYPE_LENGTH (eltype);
+      int i;
+      LONGEST low_bound, high_bound;
+
+      if (!get_array_bounds (type, &low_bound, &high_bound))
+	error (_("Could not determine the vector bounds"));
 
       val = allocate_value (type);
-      for (i = 0; i < n; i++)
+      for (i = 0; i < high_bound - low_bound + 1; i++)
         {
           tmp = value_complement (value_subscript (arg1, i));
           memcpy (value_contents_writeable (val) + i * TYPE_LENGTH (eltype),
diff --git a/gdb/valops.c b/gdb/valops.c
index dfadad8..7ea6315 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -877,11 +877,15 @@ value_one (struct type *type, enum lval_type lv)
   else if (TYPE_CODE (type1) == TYPE_CODE_ARRAY && TYPE_VECTOR (type1))
     {
       struct type *eltype = check_typedef (TYPE_TARGET_TYPE (type1));
-      int i, n = TYPE_LENGTH (type1) / TYPE_LENGTH (eltype);
+      int i;
+      LONGEST low_bound, high_bound;
       struct value *tmp;
 
+      if (!get_array_bounds (type1, &low_bound, &high_bound))
+	error (_("Could not determine the vector bounds"));
+
       val = allocate_value (type);
-      for (i = 0; i < n; i++)
+      for (i = 0; i < high_bound - low_bound + 1; i++)
 	{
 	  tmp = value_one (eltype, lv);
 	  memcpy (value_contents_writeable (val) + i * TYPE_LENGTH (eltype),


hooks/post-receive
--
Repository for Project Archer.


             reply	other threads:[~2010-12-14 17:13 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14 17:13 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-01 19:25 jkratoch
2011-01-29 16:44 jkratoch
2011-01-25 12:53 pmuldoon
2011-01-25  9:10 jkratoch
2011-01-17 13:31 pmuldoon
2011-01-15 11:35 jkratoch
2011-01-14  8:04 jkratoch
2011-01-10 12:00 pmuldoon
2011-01-10  9:10 jkratoch
2011-01-07  5:57 jkratoch
2011-01-06 12:22 pmuldoon
2011-01-04  4:59 jkratoch
2010-12-31 22:30 jkratoch
2010-12-30  7:22 jkratoch
2010-12-22 20:11 swagiaal
2010-12-14  8:27 pmuldoon
2010-12-10 17:16 jkratoch
2010-12-08 15:55 pmuldoon
2010-12-06  6:40 jkratoch
2010-12-04  1:03 jkratoch
2010-12-02 15:47 pmuldoon
2010-11-30  0:15 jkratoch
2010-11-28 18:02 jkratoch
2010-11-28  5:41 jkratoch
2010-11-16  5:04 jkratoch
2010-11-12 11:47 pmuldoon
2010-11-11 11:39 pmuldoon
2010-11-10  9:09 pmuldoon
2010-11-08  9:34 pmuldoon
2010-11-07 18:15 jkratoch
2010-10-22 14:28 pmuldoon
2010-10-20 12:48 pmuldoon
2010-10-19 16:01 pmuldoon
2010-10-17 20:27 jkratoch
2010-10-15 17:07 jkratoch
2010-10-14 20:55 jkratoch
2010-10-13 15:06 jkratoch
2010-10-12 16:45 jkratoch
2010-10-11  9:21 jkratoch
2010-10-11  8:47 pmuldoon
2010-10-06  9:00 pmuldoon
2010-09-30  8:56 pmuldoon
2010-09-27  9:48 jkratoch
2010-09-20 12:34 pmuldoon
2010-09-16 20:49 ratmice
2010-09-04 19:59 jkratoch
2010-09-03  7:26 jkratoch
2010-09-02 15:04 jkratoch
2010-09-01 15:29 swagiaal
2010-08-23 13:54 jkratoch
2010-08-20 17:49 jkratoch
2010-08-12 15:19 swagiaal
2010-08-06 15:32 jkratoch
2010-07-29 19:17 swagiaal
2010-07-22 16:57 jkratoch
2010-07-22 16:26 jkratoch
2010-07-20 18:51 jkratoch
2010-07-09  8:09 jkratoch
2010-06-24  8:55 jkratoch
2010-06-23 20:56 jkratoch
2010-06-17 12:53 jkratoch
2010-06-07  8:14 jkratoch
2010-06-02 19:03 jkratoch
2010-05-28 21:27 jkratoch
2010-05-26 18:36 swagiaal
2010-05-17 18:02 jkratoch
2010-05-17  1:04 jkratoch
2010-05-10 19:30 swagiaal
2010-05-05 14:24 swagiaal
2010-05-03 13:49 jkratoch
2010-05-03  8:48 jkratoch
2010-05-02 23:10 jkratoch
2010-05-02 15:54 jkratoch
2010-04-30  7:11 jkratoch
2010-04-28 11:44 jkratoch
2010-04-25 20:22 jkratoch
2010-04-09 20:37 jkratoch
2010-04-07  1:41 jkratoch
2010-04-05 10:11 jkratoch
2010-04-04 11:58 jkratoch
2010-03-22 23:58 jkratoch
2010-03-20 17:23 jkratoch
2010-03-18 10:01 jkratoch
2010-03-17 18:04 jkratoch
2010-03-12 18:35 jkratoch
2010-03-04 22:28 jkratoch
2010-03-01 22:16 jkratoch
2010-02-26 22:16 jkratoch
2010-02-26 17:50 jkratoch
2010-02-17 16:01 swagiaal
2010-02-13 22:51 jkratoch
2010-02-11 12:51 jkratoch
2010-02-09 19:01 jkratoch
2010-02-08 21:46 jkratoch
2010-02-03  4:38 jkratoch
2010-01-31 17:25 jkratoch
2010-01-28 19:17 swagiaal
2010-01-28 10:56 jkratoch
2010-01-27 19:21 swagiaal
2010-01-27  8:08 jkratoch
2010-01-26 18:58 swagiaal
2010-01-20 21:48 jkratoch
2010-01-15  2:09 jkratoch
2010-01-15  0:52 jkratoch
2010-01-14 22:23 jkratoch
2010-01-13 20:53 jkratoch
2010-01-10 20:47 jkratoch
2010-01-09 10:03 jkratoch
2010-01-09  8:41 jkratoch
2010-01-08 19:16 jkratoch
2009-12-06 17:43 jkratoch
2009-12-03 16:32 jkratoch
2009-11-30 13:59 jkratoch
2009-11-24 21:21 jkratoch
2009-11-21  9:24 jkratoch
2009-11-20 21:06 jkratoch
2009-11-20 15:57 jkratoch
2009-11-17 19:59 jkratoch
2009-11-16  2:22 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101214171338.10643.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).