struct program_space *pspace;
/* Innermost block required by this expression when evaluated. */
- struct block *block;
+ const struct block *block;
/* Status of this display (enabled or disabled). */
int enabled_p;
{
struct gdbarch *gdbarch = get_type_arch (type);
const struct builtin_type *builtin = builtin_type (gdbarch);
- unsigned int len = TYPE_LENGTH (type);
- if (len == TYPE_LENGTH (builtin->builtin_float))
+ if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_float))
type = builtin->builtin_float;
- else if (len == TYPE_LENGTH (builtin->builtin_double))
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_double))
type = builtin->builtin_double;
- else if (len == TYPE_LENGTH (builtin->builtin_long_double))
+ else if (TYPE_LENGTH (type) == TYPE_LENGTH (builtin->builtin_long_double))
type = builtin->builtin_long_double;
return type;
error (_("long double not supported in printf"));
#endif
case long_long_arg:
-#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
+#ifdef PRINTF_HAS_LONG_LONG
{
long long val = value_as_long (val_args[i]);
/* Parameter data. */
struct type *param_type = value_type (val_args[i]);
- unsigned int param_len = TYPE_LENGTH (param_type);
struct gdbarch *gdbarch = get_type_arch (param_type);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* Conversion between different DFP types. */
if (TYPE_CODE (param_type) == TYPE_CODE_DECFLOAT)
- decimal_convert (param_ptr, param_len, byte_order,
- dec, dfp_len, byte_order);
+ decimal_convert (param_ptr, TYPE_LENGTH (param_type),
+ byte_order, dec, dfp_len, byte_order);
else
/* If this is a non-trivial conversion, just output 0.
A correct converted value can be displayed by explicitly
handle %p as glibc would: %#x or a literal "(nil)". */
char *p, *fmt, *fmt_p;
-#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
+#ifdef PRINTF_HAS_LONG_LONG
long long val = value_as_long (val_args[i]);
#else
long val = value_as_long (val_args[i]);
gdb_assert (*p == 'p' && *(p + 1) == '\0');
if (val != 0)
{
-#if defined (CC_HAS_LONG_LONG) && defined (PRINTF_HAS_LONG_LONG)
+#ifdef PRINTF_HAS_LONG_LONG
*fmt_p++ = 'l';
#endif
*fmt_p++ = 'l';