mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-14 11:25:52 +08:00
2004-02-19 Jeff Johnston <jjohnstn@redhat.com>
* printcmd.c (print_scalar_formatted): Do not check for sizeof type being greater than sizeof of host's LONGEST. Always use unpack_long() unless format 'f' chosen.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2004-02-19 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* printcmd.c (print_scalar_formatted): Do not check for sizeof
|
||||||
|
type being greater than sizeof of host's LONGEST. Always use
|
||||||
|
unpack_long() unless format 'f' chosen.
|
||||||
|
|
||||||
2004-02-19 Joel Brobecker <brobecker@gnat.com>
|
2004-02-19 Joel Brobecker <brobecker@gnat.com>
|
||||||
|
|
||||||
Committed by Elena Zannoni <ezannoni@redhat.com>
|
Committed by Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* Print values for GNU debugger GDB.
|
/* Print values for GNU debugger GDB.
|
||||||
|
|
||||||
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
|
||||||
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
|
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
@ -350,44 +350,7 @@ print_scalar_formatted (void *valaddr, struct type *type, int format, int size,
|
|||||||
LONGEST val_long;
|
LONGEST val_long;
|
||||||
unsigned int len = TYPE_LENGTH (type);
|
unsigned int len = TYPE_LENGTH (type);
|
||||||
|
|
||||||
if (len > sizeof (LONGEST)
|
if (format != 'f')
|
||||||
&& (format == 't'
|
|
||||||
|| format == 'c'
|
|
||||||
|| format == 'o'
|
|
||||||
|| format == 'u'
|
|
||||||
|| format == 'd'
|
|
||||||
|| format == 'x'))
|
|
||||||
{
|
|
||||||
if (!TYPE_UNSIGNED (type)
|
|
||||||
|| !extract_long_unsigned_integer (valaddr, len, &val_long))
|
|
||||||
{
|
|
||||||
/* We can't print it normally, but we can print it in hex.
|
|
||||||
Printing it in the wrong radix is more useful than saying
|
|
||||||
"use /x, you dummy". */
|
|
||||||
/* FIXME: we could also do octal or binary if that was the
|
|
||||||
desired format. */
|
|
||||||
/* FIXME: we should be using the size field to give us a
|
|
||||||
minimum field width to print. */
|
|
||||||
|
|
||||||
if (format == 'o')
|
|
||||||
print_octal_chars (stream, valaddr, len);
|
|
||||||
else if (format == 'd')
|
|
||||||
print_decimal_chars (stream, valaddr, len);
|
|
||||||
else if (format == 't')
|
|
||||||
print_binary_chars (stream, valaddr, len);
|
|
||||||
else
|
|
||||||
/* replace with call to print_hex_chars? Looks
|
|
||||||
like val_print_type_code_int is redoing
|
|
||||||
work. - edie */
|
|
||||||
|
|
||||||
val_print_type_code_int (type, valaddr, stream);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we get here, extract_long_unsigned_integer set val_long. */
|
|
||||||
}
|
|
||||||
else if (format != 'f')
|
|
||||||
val_long = unpack_long (type, valaddr);
|
val_long = unpack_long (type, valaddr);
|
||||||
|
|
||||||
/* If the value is a pointer, and pointers and addresses are not the
|
/* If the value is a pointer, and pointers and addresses are not the
|
||||||
|
Reference in New Issue
Block a user