public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@redhat.com To: gdb-testers@sourceware.org Subject: [binutils-gdb] Forward VALUE_LVAL when avoiding side effects for STRUCTOP_STRUCT Date: Mon, 12 Oct 2015 10:32:00 -0000 [thread overview] Message-ID: <2520f728b710c0249cde01b8cfb4872a22ef10b6@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 2520f728b710c0249cde01b8cfb4872a22ef10b6 *** Author: Pierre-Marie de Rodat <derodat@adacore.com> Branch: master Commit: 2520f728b710c0249cde01b8cfb4872a22ef10b6 Forward VALUE_LVAL when avoiding side effects for STRUCTOP_STRUCT Assume foo_array is a pointer to a C structure. GDB must evaluate the following expression properly, but it does not currently: (gdb) print 1 && &foo_array[1].a Attempt to take address of value not located in memory. The problem is that in EVAL_AVOID_SIDE_EFFECTS mode, eval.c:evaluate_subexp_standard always returns a not_lval value as the result for a STRUCTOP_STRUCT operation. As a consequence, the rest of the code believes that one cannot take the address of the returned value. This patch fixes STRUCTOP_STRUCT handling so that the VALUE_LVAL attribute for the returned value is properly initialized. After this change, the above session becomes: (gdb) print 1 && &foo_array[1].a $1 = 1 gdb/ChangeLog: * eval.c (evaluate_subexp_standard) <STRUCTOP_STRUCT>: If EVAL_AVOID_SIDE_EFFECTS mode, forward the VALUE_LVAL attribute to the returned value. gdb/testsuite/ChangeLog: * gdb.base/nested-addr.c: New file. * gdb.base/nested-addr.exp: New testcase. Tested on x86_64-linux, no regression.
next reply other threads:[~2015-10-12 10:32 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-12 10:32 sergiodj+buildbot [this message] 2015-10-12 10:32 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot 2015-10-12 10:32 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot 2015-10-12 10:42 ` Failures on Debian-i686, " sergiodj+buildbot 2015-10-12 10:48 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot 2015-10-12 10:50 ` Failures on AIX-POWER7-plain, " sergiodj+buildbot 2015-10-12 11:00 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:00 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:00 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot 2015-10-12 11:07 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:12 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot 2015-10-12 11:15 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot 2015-10-12 11:16 ` Failures on Fedora-ppc64be-native-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:23 ` Failures on Debian-x86_64-native-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:24 ` Failures on Debian-i686-native-extended-gdbserver, " sergiodj+buildbot 2015-10-12 11:25 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot 2015-10-12 11:34 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot 2015-10-12 11:40 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot
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=2520f728b710c0249cde01b8cfb4872a22ef10b6@gdb-build \ --to=sergiodj+buildbot@redhat.com \ --cc=gdb-testers@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: linkBe 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).