Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Fix typo in replace type
Date: Wed, 28 Feb 2007 19:24:00 -0000	[thread overview]
Message-ID: <20070228192410.GM28322@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

This is a followup on something that was discovered while reviewing
a stabs patch:

   http://www.sourceware.org/ml/gdb-patches/2007-02/msg00139.html

In particular, this is where we discovered this little typo:

   http://www.sourceware.org/ml/gdb-patches/2007-02/msg00368.html

I confirm that I misanalyzed the second problem I mentioned in my
original message, and that this is the source of the issue I was seeing:

   Breakpoint 1, pck.lock.set (x=Unrecognized 0-bit floating-point type.
   ) at pck.adb:11

Basically, the effect of the typo is that we forgot to update the
type length of the other types in the same CV ring. Fixed thusly.

2007-02-28  Joel Brobecker  <brobecker@adacore.com>

        * gdbtypes.c (replace_type): Fix typo that caused us to not update
        length of the types referenced by the new type CV ring.

Tested on x86-linux, no regression.  OK to apply?

Thanks,
-- 
Joel

[-- Attachment #2: replace_type.diff --]
[-- Type: text/plain, Size: 581 bytes --]

Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.113
diff -u -p -r1.113 gdbtypes.c
--- gdbtypes.c	28 Feb 2007 16:35:48 -0000	1.113
+++ gdbtypes.c	28 Feb 2007 19:09:56 -0000
@@ -636,7 +636,7 @@ replace_type (struct type *ntype, struct
        call replace_type().  */
     gdb_assert (TYPE_ADDRESS_CLASS_ALL (chain) == 0);
 
-    TYPE_LENGTH (ntype) = TYPE_LENGTH (type);
+    TYPE_LENGTH (chain) = TYPE_LENGTH (type);
     chain = TYPE_CHAIN (chain);
   } while (ntype != chain);
 

             reply	other threads:[~2007-02-28 19:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 19:24 Joel Brobecker [this message]
2007-02-28 19:31 ` Daniel Jacobowitz
2007-02-28 19:36   ` Joel Brobecker

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=20070228192410.GM28322@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@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