aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 2f2bd14..57d8ec1 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -455,10 +455,13 @@ f_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
and for straight literals (i.e. of the form 'hello world'),
valaddr points a ptr to VALUE_LITERAL_DATA(value). */
- /* First dereference valaddr. */
-
- straddr = * (CORE_ADDR *) valaddr;
-
+ /* First dereference valaddr. This relies on valaddr pointing to the
+ aligner union of a struct value (so we are now fetching the
+ literal_data pointer from that union). FIXME: Is this always
+ true. */
+
+ straddr = * (char **) valaddr;
+
if (straddr)
{
len = TYPE_LENGTH (type);