public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-jankratochvil-fedora12: gdb/ Fix RHBZ#553338. * value.c (set_value_component_location): Call set_value_address only for COMPONENTs where it does not assert.
@ 2010-01-07 20:51 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-01-07 20:51 UTC (permalink / raw)
To: archer-commits
The branch, archer-jankratochvil-fedora12 has been updated
via 6e73988f653ba986e8742f208f17ec084292cbd5 (commit)
from 200516d5be8a1cab02f0b18d607d1c1fb9cfa3e7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 6e73988f653ba986e8742f208f17ec084292cbd5
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
Date: Thu Jan 7 21:49:00 2010 +0100
gdb/
Fix RHBZ#553338.
* value.c (set_value_component_location): Call set_value_address only
for COMPONENTs where it does not assert.
gdb/testsuite/
Fix RHBZ#553338.
* gdb.base/internal-var-field-address.exp,
gdb.base/internal-var-field-address.c: New.
-----------------------------------------------------------------------
Summary of changes:
.../gdb.base/internal-var-field-address.c | 20 +++++++++++++++
.../gdb.base/internal-var-field-address.exp | 26 ++++++++++++++++++++
gdb/value.c | 4 ++-
3 files changed, 49 insertions(+), 1 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.c
create mode 100644 gdb/testsuite/gdb.base/internal-var-field-address.exp
First 500 lines of diff:
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.c b/gdb/testsuite/gdb.base/internal-var-field-address.c
new file mode 100644
index 0000000..eeb7b85
--- /dev/null
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.c
@@ -0,0 +1,20 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+struct {
+ int field;
+} staticstruct = { 1 };
diff --git a/gdb/testsuite/gdb.base/internal-var-field-address.exp b/gdb/testsuite/gdb.base/internal-var-field-address.exp
new file mode 100644
index 0000000..6d82e73
--- /dev/null
+++ b/gdb/testsuite/gdb.base/internal-var-field-address.exp
@@ -0,0 +1,26 @@
+# Copyright 2009 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set test internal-var-field-address
+set binfile ${test}.x
+if { [gdb_compile "${srcdir}/${subdir}/${test}.c" "${objdir}/${subdir}/${binfile}" object {debug}] != "" } {
+ untested "Couldn't compile test program"
+ return -1
+}
+
+clean_restart $binfile
+
+gdb_test {set $varstruct = staticstruct}
+gdb_test {p $varstruct.field} " = 1"
diff --git a/gdb/value.c b/gdb/value.c
index 66013b7..62003fa 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -802,7 +802,9 @@ set_value_component_location (struct value *component, struct value *whole)
addr = value_raw_address (component);
object_address_get_data (value_type (whole), &addr);
- set_value_address (component, addr);
+ if (component->lval != lval_internalvar
+ && component->lval != lval_internalvar_component)
+ set_value_address (component, addr);
}
\f
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-07 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07 20:51 [SCM] archer-jankratochvil-fedora12: gdb/ Fix RHBZ#553338. * value.c (set_value_component_location): Call set_value_address only for COMPONENTs where it does not assert jkratoch
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).