Wed Aug 18 12:03:00 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * printcmd.c (print_address), values.c (value_as_pointer): Don't
+ use ADDR_BITS_REMOVE.
+
* blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL.
* frame.h: Declare it.
CORE_ADDR addr;
FILE *stream;
{
-#ifdef ADDR_BITS_REMOVE
+#if 0 && defined (ADDR_BITS_REMOVE)
+ /* This is wrong for pointer to char, in which we do want to print
+ the low bits. */
fprintf_filtered (stream, local_hex_format(), ADDR_BITS_REMOVE(addr));
#else
fprintf_filtered (stream, local_hex_format(), addr);
MAKEVA_EXTRA_INFO
#endif
- char arg_bytes[1];
+ /* Some systems (mips, pa) would like this to be aligned, and it never
+ will hurt. */
+ union
+ {
+ char arg_bytes[1];
+ double force_double_align;
+ LONGEST force_long_align;
+ } aligner;
} makeva_list;
/* Tell the caller how many bytes to allocate for a makeva_list with NARGS
unsigned int nargs;
unsigned int max_arg_size;
{
- return sizeof (makeva_list) + nargs * max_arg_size
- /* The PA might need up to this much for alignment. */
- + max_arg_size - 1;
+ return sizeof (makeva_list) + nargs * max_arg_size;
}
/* Start working on LIST with NARGS arguments and whose largest
#if defined (MAKEVA_ARG)
MAKEVA_ARG (list, argaddr, argsize);
#else
- memcpy (&list->arg_bytes[list->argindex], argaddr, argsize);
+ memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize);
list->argindex += argsize;
#endif
}
MAKEVA_END (list);
#else
/* This works if a va_list is just a pointer to the arguments. */
- return (va_list) list->arg_bytes;
+ return (va_list) list->aligner.arg_bytes;
#endif
}
\f
{
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
whether we want this to be true eventually. */
+#if 0
+ /* ADDR_BITS_REMOVE is wrong if we are being called for a
+ non-address (e.g. argument to "signal", "info break", etc.), or
+ for pointers to char, in which the low bits *are* significant. */
return ADDR_BITS_REMOVE(value_as_long (val));
+#else
+ return value_as_long (val);
+#endif
}
\f
/* Unpack raw data (copied from debugee, target byte order) at VALADDR