aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>1998-05-18 15:34:05 +0000
committerNick Clifton <nickc@gcc.gnu.org>1998-05-18 15:34:05 +0000
commit53f2d03397ef63911a713001853dd40500b01645 (patch)
tree3b4eb4020bd4fcf46e3ac35d26e8d783e06a1507 /gcc
parenta9f7d5a172d0452628681c284574a6ec26503144 (diff)
downloadgcc-53f2d03397ef63911a713001853dd40500b01645.zip
gcc-53f2d03397ef63911a713001853dd40500b01645.tar.gz
gcc-53f2d03397ef63911a713001853dd40500b01645.tar.bz2
Undid previous delta to dbxout.c
Added comment explaining why. From-SVN: r19855
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/dbxout.c16
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5d298e8..d8e83c5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 18 15:30:42 1998 Nick Clifton <nickc@cygnus.com>
+
+ * dbxout.c (dbxout_parms): Revert to using DECL_ARG_TYPE. Add
+ comment explaining why.
+
Mon May 18 13:20:23 1998 Richard Henderson <rth@cygnus.com>
* tree.h (TYPE_SIZE_UNIT): New.
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index fac184e..f3cb7ed 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2274,7 +2274,21 @@ dbxout_parms (parms)
DBX_MEMPARM_STABS_LETTER);
}
- dbxout_type (TREE_TYPE (parms), 0, 0);
+ /* It is quite tempting to use:
+
+ dbxout_type (TREE_TYPE (parms), 0, 0);
+
+ as the next statement, rather than using DECL_ARG_TYPE(), so
+ that gcc reports the actual type of the parameter, rather
+ than the promoted type. This certainly makes GDB's life
+ easier, at least for some ports. The change is a bad idea
+ however, since GDB expects to be able access the type without
+ performing any conversions. So for example, if we were
+ passing a float to an unprototyped function, gcc will store a
+ double on the stack, but if we emit a stab saying the type is a
+ float, then gdb will only read in a single value, and this will
+ produce an erropneous value. */
+ dbxout_type (DECL_ARG_TYPE (parms), 0, 0);
current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr);
dbxout_finish_symbol (parms);
}