along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#include <string.h>
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "valprint.h"
#include "floatformat.h"
#include "doublest.h"
-#include "exceptions.h"
#include "dfp.h"
#include "extension.h"
#include "ada-lang.h"
#include "charset.h"
#include <ctype.h>
-#include <errno.h>
-
/* Maximum number of wchars returned from wchar_iterate. */
#define MAX_WCHARS 4
&& TYPE_CODE (type) != TYPE_CODE_STRUCT
&& TYPE_CODE (type) != TYPE_CODE_ARRAY)
{
- if (!value_bits_valid (val, TARGET_CHAR_BIT * embedded_offset,
- TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+ if (value_bits_any_optimized_out (val,
+ TARGET_CHAR_BIT * embedded_offset,
+ TARGET_CHAR_BIT * TYPE_LENGTH (type)))
{
val_print_optimized_out (val, stream);
return 0;
/* A scalar object that does not have all bits available can't be
printed, because all bits contribute to its representation. */
- if (!value_bits_valid (val, TARGET_CHAR_BIT * embedded_offset,
- TARGET_CHAR_BIT * TYPE_LENGTH (type)))
+ if (value_bits_any_optimized_out (val,
+ TARGET_CHAR_BIT * embedded_offset,
+ TARGET_CHAR_BIT * TYPE_LENGTH (type)))
val_print_optimized_out (val, stream);
else if (!value_bytes_available (val, embedded_offset, TYPE_LENGTH (type)))
val_print_unavailable (stream);
if (options->repeat_count_threshold < UINT_MAX)
{
while (rep1 < len
- && value_available_contents_eq (val,
- embedded_offset + i * eltlen,
- val,
- (embedded_offset
- + rep1 * eltlen),
- eltlen))
+ && value_contents_eq (val,
+ embedded_offset + i * eltlen,
+ val,
+ (embedded_offset
+ + rep1 * eltlen),
+ eltlen))
{
++reps;
++rep1;
LEN is -1. */
/* Determine found_nul by looking at the last character read. */
- found_nul = extract_unsigned_integer (buffer + bytes_read - width, width,
- byte_order) == 0;
+ found_nul = 0;
+ if (bytes_read >= width)
+ found_nul = extract_unsigned_integer (buffer + bytes_read - width, width,
+ byte_order) == 0;
if (len == -1 && !found_nul)
{
gdb_byte *peekbuf;
{
printf_unfiltered (
"\"set print\" must be followed by the name of a print subcommand.\n");
- help_list (setprintlist, "set print ", -1, gdb_stdout);
+ help_list (setprintlist, "set print ", all_commands, gdb_stdout);
}
static void
{
printf_unfiltered (
"\"set print raw\" must be followed by the name of a \"print raw\" subcommand.\n");
- help_list (setprintrawlist, "set print raw ", -1, gdb_stdout);
+ help_list (setprintrawlist, "set print raw ", all_commands, gdb_stdout);
}
static void