projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
gdb
/
valprint.c
diff --git
a/gdb/valprint.c
b/gdb/valprint.c
index e5b28f3ee9ebe7fd85765aa859278dbcc43efc8d..e0eb8e1839789b25bb0618f7ab18395983488db7 100644
(file)
--- a/
gdb/valprint.c
+++ b/
gdb/valprint.c
@@
-38,6
+38,7
@@
#include "gdbsupport/byte-vector.h"
#include "cli/cli-option.h"
#include "gdbarch.h"
#include "gdbsupport/byte-vector.h"
#include "cli/cli-option.h"
#include "gdbarch.h"
+#include "cli/cli-style.h"
/* Maximum number of wchars returned from wchar_iterate. */
#define MAX_WCHARS 4
/* Maximum number of wchars returned from wchar_iterate. */
#define MAX_WCHARS 4
@@
-347,7
+348,8
@@
valprint_check_validity (struct ui_file *stream,
}
if (!is_ref || !ref_is_addressable)
}
if (!is_ref || !ref_is_addressable)
- fputs_filtered (_("<synthetic pointer>"), stream);
+ fputs_styled (_("<synthetic pointer>"), metadata_style.style (),
+ stream);
/* C++ references should be valid even if they're synthetic. */
return is_ref;
/* C++ references should be valid even if they're synthetic. */
return is_ref;
@@
-369,25
+371,25
@@
val_print_optimized_out (const struct value *val, struct ui_file *stream)
if (val != NULL && value_lval_const (val) == lval_register)
val_print_not_saved (stream);
else
if (val != NULL && value_lval_const (val) == lval_register)
val_print_not_saved (stream);
else
- fprintf_
filtered (stream
, _("<optimized out>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<optimized out>"));
}
void
val_print_not_saved (struct ui_file *stream)
{
}
void
val_print_not_saved (struct ui_file *stream)
{
- fprintf_
filtered (stream
, _("<not saved>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<not saved>"));
}
void
val_print_unavailable (struct ui_file *stream)
{
}
void
val_print_unavailable (struct ui_file *stream)
{
- fprintf_
filtered (stream
, _("<unavailable>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<unavailable>"));
}
void
val_print_invalid_address (struct ui_file *stream)
{
}
void
val_print_invalid_address (struct ui_file *stream)
{
- fprintf_
filtered (stream
, _("<invalid address>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<invalid address>"));
}
/* Print a pointer based on the type of its target.
}
/* Print a pointer based on the type of its target.
@@
-988,7
+990,7
@@
generic_val_print (struct type *type,
/* This happens (without TYPE_STUB set) on systems which don't use
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
/* This happens (without TYPE_STUB set) on systems which don't use
dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar"
and no complete type for struct foo in that file. */
- fprintf_
filtered (stream
, _("<incomplete type>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<incomplete type>"));
break;
case TYPE_CODE_COMPLEX:
break;
case TYPE_CODE_COMPLEX:
@@
-1047,7
+1049,7
@@
val_print (struct type *type, LONGEST embedded_offset,
if (TYPE_STUB (real_type))
{
if (TYPE_STUB (real_type))
{
- fprintf_
filtered (stream
, _("<incomplete type>"));
+ fprintf_
styled (stream, metadata_style.style ()
, _("<incomplete type>"));
return;
}
return;
}
@@
-1084,7
+1086,8
@@
val_print (struct type *type, LONGEST embedded_offset,
}
catch (const gdb_exception_error &except)
{
}
catch (const gdb_exception_error &except)
{
- fprintf_filtered (stream, _("<error reading variable>"));
+ fprintf_styled (stream, metadata_style.style (),
+ _("<error reading variable>"));
}
}
}
}
@@
-1115,7
+1118,8
@@
value_check_printable (struct value *val, struct ui_file *stream,
{
if (val == 0)
{
{
if (val == 0)
{
- fprintf_filtered (stream, _("<address of value unknown>"));
+ fprintf_styled (stream, metadata_style.style (),
+ _("<address of value unknown>"));
return 0;
}
return 0;
}
@@
-1139,8
+1143,9
@@
value_check_printable (struct value *val, struct ui_file *stream,
if (TYPE_CODE (value_type (val)) == TYPE_CODE_INTERNAL_FUNCTION)
{
if (TYPE_CODE (value_type (val)) == TYPE_CODE_INTERNAL_FUNCTION)
{
- fprintf_filtered (stream, _("<internal function %s>"),
- value_internal_function_name (val));
+ fprintf_styled (stream, metadata_style.style (),
+ _("<internal function %s>"),
+ value_internal_function_name (val));
return 0;
}
return 0;
}
@@
-1324,7
+1329,7
@@
val_print_scalar_formatted (struct type *type,
(leading 0 or 0x).
Hilfinger/2004-09-09: USE_C_FORMAT was originally called USE_LOCAL
(leading 0 or 0x).
Hilfinger/2004-09-09: USE_C_FORMAT was originally called USE_LOCAL
- and was intended to request formating according to the current
+ and was intended to request format
t
ing according to the current
language and would be used for most integers that GDB prints. The
exceptional cases were things like protocols where the format of
the integer is a protocol thing, not a user-visible thing). The
language and would be used for most integers that GDB prints. The
exceptional cases were things like protocols where the format of
the integer is a protocol thing, not a user-visible thing). The
@@
-1715,7
+1720,7
@@
print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr,
* decimal.
*
* Given a hex number (in nibbles) as XYZ, we start by taking X and
* decimal.
*
* Given a hex number (in nibbles) as XYZ, we start by taking X and
- * dec
e
malizing it as "x1 x2" in two decimal nibbles. Then we multiply
+ * dec
i
malizing it as "x1 x2" in two decimal nibbles. Then we multiply
* the nibbles by 16, add Y and re-decimalize. Repeat with Z.
*
* The trick is that "digits" holds a base-10 number, but sometimes
* the nibbles by 16, add Y and re-decimalize. Repeat with Z.
*
* The trick is that "digits" holds a base-10 number, but sometimes
@@
-2069,7
+2074,8
@@
val_print_array_elements (struct type *type,
address, stream, recurse + 1, val, options,
current_language);
annotate_elt_rep (reps);
address, stream, recurse + 1, val, options,
current_language);
annotate_elt_rep (reps);
- fprintf_filtered (stream, " <repeats %u times>", reps);
+ fprintf_filtered (stream, " %p[<repeats %u times>%p]",
+ metadata_style.style ().ptr (), reps, nullptr);
annotate_elt_rep_end ();
i = rep1 - 1;
annotate_elt_rep_end ();
i = rep1 - 1;
@@
-2658,7
+2664,7
@@
print_converted_chars_to_obstack (struct obstack *obstack,
obstack, 0, &need_escape);
obstack_grow_wstr (obstack, LCST (">"));
obstack, 0, &need_escape);
obstack_grow_wstr (obstack, LCST (">"));
- /* We do not attempt to out
up
t anything after this. */
+ /* We do not attempt to out
pu
t anything after this. */
state = FINISH;
break;
state = FINISH;
break;
@@
-3114,7
+3120,7
@@
using uinteger_option_def
using zuinteger_unlimited_option_def
= gdb::option::zuinteger_unlimited_option_def<value_print_options>;
using zuinteger_unlimited_option_def
= gdb::option::zuinteger_unlimited_option_def<value_print_options>;
-/* Definions of options for the "print" and "compile print"
+/* Defini
ti
ons of options for the "print" and "compile print"
commands. */
static const gdb::option::option_def value_print_option_defs[] = {
commands. */
static const gdb::option::option_def value_print_option_defs[] = {
This page took
0.027107 seconds
and
4
git commands to generate.