From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Tom Tromey'" <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] examine for TYPE_CODE_REF (PR 11349)
Date: Tue, 04 May 2010 06:52:00 -0000 [thread overview]
Message-ID: <001801caeb56$599dd070$0cd97150$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <m3fx28riiy.fsf@fleche.redhat.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : Monday, May 03, 2010 7:40 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] examine for TYPE_CODE_REF (PR 11349)
>
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
> writes:
>
> Pierre> +send_gdb "x /hd rps\n"
> Pierre> +gdb_expect {
> Pierre> + -re ".* -1.*$gdb_prompt $" {
> Pierre> + pass "examine value at rps"
> Pierre> + }
> Pierre> + -re ".*$gdb_prompt $" { fail "examine value at rps" }
> Pierre> + timeout { fail "(timeout) examine value at rps"
> }
> Pierre> + }
> Pierre> +
>
> These days we're trying to use gdb_test rather than send_gdb.
> The patch is ok with that change.
It's just that all the other tests around this one
where also written using gdb_expect, and I simply copy
and adapted one...
Thanks for the approval,
patch committed
http://sourceware.org/ml/gdb-cvs/2010-05/msg00026.html
Pierre
PS: I had one point for which I was unsure:
I use '/h' modifier which means 16 bit size,
are there any systems for which C type 'short' is not 16 bit in size?
On such systems, the test might fail ...
For the testsuite, this is how I modified it:
Index: testsuite/gdb.cp/ref-types.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/ref-types.exp,v
retrieving revision 1.12
diff -u -p -r1.12 ref-types.exp
--- testsuite/gdb.cp/ref-types.exp 1 Jan 2010 07:32:01 -0000 1.12
+++ testsuite/gdb.cp/ref-types.exp 4 May 2010 06:47:56 -0000
@@ -200,6 +200,11 @@ gdb_expect {
timeout { fail "(timeout) print value of *rps" }
}
+# GDB had a bug about dereferencing a pointer type
+# that would lead to wrong results
+# if we try to examine memory at pointer value.
+
+gdb_test "x /hd rps" "$hex:\[ \t\]*-1" "examine value at rps"
send_gdb "ptype rps\n"
gdb_expect {
next prev parent reply other threads:[~2010-05-04 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <17731.9300863475$1272644394@news.gmane.org>
2010-04-30 16:59 ` [RFC] examine for TYPE_CODE_REF in pascal language PR 11349 Tom Tromey
2010-05-02 23:01 ` [RFA] examine for TYPE_CODE_REF (PR 11349) Pierre Muller
2010-05-03 17:40 ` Tom Tromey
2010-05-04 6:52 ` Pierre Muller [this message]
2010-05-04 14:22 ` 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='001801caeb56$599dd070$0cd97150$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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