mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 13:53:29 +08:00
PR cli/7719:
* NEWS: Update. * ada-valprint.c (printstr, print_field_values): Remove "inspect_it" code. * cp-valprint.c (cp_print_value_fields): Remove "inspect_it" code. * jv-valprint.c (java_print_value_fields): Remove "inspect_it" code. * m2-lang.c (m2_printstr): Remove "inspect_it" code. * main.c (captured_main): Remove "epoch" argument. * objc-lang.c (objc_printstr): Remove "inspect_it" code. * p-lang.c (pascal_printstr): Remove "inspect_it" code. * p-valprint.c (pascal_object_print_value_fields): Remove "inspect_it" code. * printcmd.c (print_command_1): Remove 'inspect' argument. (print_command, call_command): Update. (inspect_command): Remove. (_initialize_printcmd): Make "inspect" an alias for "print". * top.c (epoch_interface): Remove. * top.h (epoch_interface): Remove. * valprint.c (user_print_options): Update. (print_converted_chars_to_obstack): Remove "inspect_it" code. * valprint.h (struct value_print_options) <inspect_it>: Remove field. doc * gdb.texinfo (Mode Options): Don't mention -epoch. (Data, Emacs): Remove obsolete comments.
This commit is contained in:
@ -1,3 +1,34 @@
|
|||||||
|
2013-01-07 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
PR cli/7719:
|
||||||
|
* NEWS: Update.
|
||||||
|
* ada-valprint.c (printstr, print_field_values): Remove
|
||||||
|
"inspect_it" code.
|
||||||
|
* cp-valprint.c (cp_print_value_fields): Remove "inspect_it"
|
||||||
|
code.
|
||||||
|
* jv-valprint.c (java_print_value_fields): Remove "inspect_it"
|
||||||
|
code.
|
||||||
|
* m2-lang.c (m2_printstr): Remove "inspect_it" code.
|
||||||
|
* main.c (captured_main): Remove "epoch" argument.
|
||||||
|
* objc-lang.c (objc_printstr): Remove "inspect_it" code.
|
||||||
|
* p-lang.c (pascal_printstr): Remove "inspect_it" code.
|
||||||
|
* p-valprint.c (pascal_object_print_value_fields): Remove
|
||||||
|
"inspect_it" code.
|
||||||
|
* printcmd.c (print_command_1): Remove 'inspect' argument.
|
||||||
|
(print_command, call_command): Update.
|
||||||
|
(inspect_command): Remove.
|
||||||
|
(_initialize_printcmd): Make "inspect" an alias for "print".
|
||||||
|
* top.c (epoch_interface): Remove.
|
||||||
|
* top.h (epoch_interface): Remove.
|
||||||
|
* valprint.c (user_print_options): Update.
|
||||||
|
(print_converted_chars_to_obstack): Remove "inspect_it" code.
|
||||||
|
* valprint.h (struct value_print_options) <inspect_it>: Remove
|
||||||
|
field.
|
||||||
|
|
||||||
|
2013-01-04 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* valprint.h (read_string): Add 'extern'.
|
||||||
|
|
||||||
2013-01-07 Joel Brobecker <brobecker@adacore.com>
|
2013-01-07 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* darwin-nat.c: Fix typo in TASK_DYLD_INFO_COUNT macro test
|
* darwin-nat.c: Fix typo in TASK_DYLD_INFO_COUNT macro test
|
||||||
@ -62,7 +93,7 @@
|
|||||||
|
|
||||||
Update year range in copyright notice of all files.
|
Update year range in copyright notice of all files.
|
||||||
|
|
||||||
2013-01-01 Joel Brobecker <brobecker@adacore.com>
|
2013-01-01, 13 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
* top.c (print_gdb_version): Update copyright year.
|
* top.c (print_gdb_version): Update copyright year.
|
||||||
|
|
||||||
|
5
gdb/NEWS
5
gdb/NEWS
@ -19,6 +19,11 @@ Lynx 178 PowerPC powerpc-*-lynx*178
|
|||||||
-nh Disables auto-loading of ~/.gdbinit, but still executes all the
|
-nh Disables auto-loading of ~/.gdbinit, but still executes all the
|
||||||
other initialization files, unlike -nx which disables all of them.
|
other initialization files, unlike -nx which disables all of them.
|
||||||
|
|
||||||
|
* Removed command line options
|
||||||
|
|
||||||
|
-epoch This was used by the gdb mode in Epoch, an ancient fork of
|
||||||
|
Emacs.
|
||||||
|
|
||||||
* The 'ptype' and 'whatis' commands now accept an argument to control
|
* The 'ptype' and 'whatis' commands now accept an argument to control
|
||||||
type formatting.
|
type formatting.
|
||||||
|
|
||||||
|
@ -509,10 +509,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
|||||||
{
|
{
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\", ", stream);
|
||||||
fputs_filtered ("\\\", ", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\", ", stream);
|
|
||||||
in_quotes = 0;
|
in_quotes = 0;
|
||||||
}
|
}
|
||||||
fputs_filtered ("'", stream);
|
fputs_filtered ("'", stream);
|
||||||
@ -528,10 +525,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
|||||||
{
|
{
|
||||||
if (!in_quotes)
|
if (!in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\"", stream);
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
in_quotes = 1;
|
in_quotes = 1;
|
||||||
}
|
}
|
||||||
ada_emit_char (char_at (string, i, type_len, byte_order),
|
ada_emit_char (char_at (string, i, type_len, byte_order),
|
||||||
@ -542,12 +536,7 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
|||||||
|
|
||||||
/* Terminate the quotes if necessary. */
|
/* Terminate the quotes if necessary. */
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
fputs_filtered ("\"", stream);
|
||||||
if (options->inspect_it)
|
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force_ellipses || i < length)
|
if (force_ellipses || i < length)
|
||||||
fputs_filtered ("...", stream);
|
fputs_filtered ("...", stream);
|
||||||
@ -1089,29 +1078,14 @@ print_field_values (struct type *type, const gdb_byte *valaddr,
|
|||||||
{
|
{
|
||||||
wrap_here (n_spaces (2 + 2 * recurse));
|
wrap_here (n_spaces (2 + 2 * recurse));
|
||||||
}
|
}
|
||||||
if (options->inspect_it)
|
|
||||||
{
|
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||||
if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
|
fprintf_filtered (stream, "%.*s",
|
||||||
fputs_filtered ("\"( ptr \"", stream);
|
ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
|
||||||
else
|
TYPE_FIELD_NAME (type, i));
|
||||||
fputs_filtered ("\"( nodef \"", stream);
|
annotate_field_name_end ();
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
fputs_filtered (" => ", stream);
|
||||||
language_cplus, DMGL_NO_OPTS);
|
annotate_field_value ();
|
||||||
fputs_filtered ("\" \"", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
|
||||||
language_cplus, DMGL_NO_OPTS);
|
|
||||||
fputs_filtered ("\") \"", stream);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
|
||||||
fprintf_filtered (stream, "%.*s",
|
|
||||||
ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
|
|
||||||
TYPE_FIELD_NAME (type, i));
|
|
||||||
annotate_field_name_end ();
|
|
||||||
fputs_filtered (" => ", stream);
|
|
||||||
annotate_field_value ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TYPE_FIELD_PACKED (type, i))
|
if (TYPE_FIELD_PACKED (type, i))
|
||||||
{
|
{
|
||||||
|
@ -259,42 +259,21 @@ cp_print_value_fields (struct type *type, struct type *real_type,
|
|||||||
{
|
{
|
||||||
wrap_here (n_spaces (2 + 2 * recurse));
|
wrap_here (n_spaces (2 + 2 * recurse));
|
||||||
}
|
}
|
||||||
if (options->inspect_it)
|
|
||||||
{
|
|
||||||
if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
|
|
||||||
fputs_filtered ("\"( ptr \"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"( nodef \"", stream);
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream,
|
|
||||||
TYPE_FIELD_NAME (type, i),
|
|
||||||
current_language->la_language,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\" \"", stream);
|
|
||||||
fprintf_symbol_filtered (stream,
|
|
||||||
TYPE_FIELD_NAME (type, i),
|
|
||||||
current_language->la_language,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\") \"", stream);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
|
||||||
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream,
|
if (field_is_static (&TYPE_FIELD (type, i)))
|
||||||
TYPE_FIELD_NAME (type, i),
|
fputs_filtered ("static ", stream);
|
||||||
current_language->la_language,
|
fprintf_symbol_filtered (stream,
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
TYPE_FIELD_NAME (type, i),
|
||||||
annotate_field_name_end ();
|
current_language->la_language,
|
||||||
/* Do not print leading '=' in case of anonymous
|
DMGL_PARAMS | DMGL_ANSI);
|
||||||
unions. */
|
annotate_field_name_end ();
|
||||||
if (strcmp (TYPE_FIELD_NAME (type, i), ""))
|
/* Do not print leading '=' in case of anonymous
|
||||||
fputs_filtered (" = ", stream);
|
unions. */
|
||||||
annotate_field_value ();
|
if (strcmp (TYPE_FIELD_NAME (type, i), ""))
|
||||||
}
|
fputs_filtered (" = ", stream);
|
||||||
|
annotate_field_value ();
|
||||||
|
|
||||||
if (!field_is_static (&TYPE_FIELD (type, i))
|
if (!field_is_static (&TYPE_FIELD (type, i))
|
||||||
&& TYPE_FIELD_PACKED (type, i))
|
&& TYPE_FIELD_PACKED (type, i))
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2013-01-07 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* gdb.texinfo (Mode Options): Don't mention -epoch.
|
||||||
|
(Data, Emacs): Remove obsolete comments.
|
||||||
|
|
||||||
2013-01-02 Tom Tromey <tromey@redhat.com>
|
2013-01-02 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* gdb.texinfo (GDB/MI Output Records): Update menu.
|
* gdb.texinfo (GDB/MI Output Records): Update menu.
|
||||||
|
@ -1178,13 +1178,6 @@ and a newline. The Emacs-to-@value{GDBN} interface program uses the two
|
|||||||
@samp{\032} characters as a signal to display the source code for the
|
@samp{\032} characters as a signal to display the source code for the
|
||||||
frame.
|
frame.
|
||||||
|
|
||||||
@item -epoch
|
|
||||||
@cindex @code{--epoch}
|
|
||||||
The Epoch Emacs-@value{GDBN} interface sets this option when it runs
|
|
||||||
@value{GDBN} as a subprocess. It tells @value{GDBN} to modify its print
|
|
||||||
routines so as to allow Epoch to display values of expressions in a
|
|
||||||
separate window.
|
|
||||||
|
|
||||||
@item -annotate @var{level}
|
@item -annotate @var{level}
|
||||||
@cindex @code{--annotate}
|
@cindex @code{--annotate}
|
||||||
This option sets the @dfn{annotation level} inside @value{GDBN}. Its
|
This option sets the @dfn{annotation level} inside @value{GDBN}. Its
|
||||||
@ -7390,9 +7383,6 @@ instruction.
|
|||||||
@cindex examining data
|
@cindex examining data
|
||||||
@kindex print
|
@kindex print
|
||||||
@kindex inspect
|
@kindex inspect
|
||||||
@c "inspect" is not quite a synonym if you are using Epoch, which we do not
|
|
||||||
@c document because it is nonstandard... Under Epoch it displays in a
|
|
||||||
@c different window or something like that.
|
|
||||||
The usual way to examine data in your program is with the @code{print}
|
The usual way to examine data in your program is with the @code{print}
|
||||||
command (abbreviated @code{p}), or its synonym @code{inspect}. It
|
command (abbreviated @code{p}), or its synonym @code{inspect}. It
|
||||||
evaluates and prints the value of an expression of the language your
|
evaluates and prints the value of an expression of the language your
|
||||||
@ -27102,21 +27092,6 @@ A more detailed description of Emacs' interaction with @value{GDBN} is
|
|||||||
given in the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu}
|
given in the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu}
|
||||||
Emacs Manual}).
|
Emacs Manual}).
|
||||||
|
|
||||||
@c The following dropped because Epoch is nonstandard. Reactivate
|
|
||||||
@c if/when v19 does something similar. ---doc@cygnus.com 19dec1990
|
|
||||||
@ignore
|
|
||||||
@kindex Emacs Epoch environment
|
|
||||||
@kindex Epoch
|
|
||||||
@kindex inspect
|
|
||||||
|
|
||||||
Version 18 of @sc{gnu} Emacs has a built-in window system
|
|
||||||
called the @code{epoch}
|
|
||||||
environment. Users of this environment can use a new command,
|
|
||||||
@code{inspect} which performs identically to @code{print} except that
|
|
||||||
each value is printed in its own window.
|
|
||||||
@end ignore
|
|
||||||
|
|
||||||
|
|
||||||
@node GDB/MI
|
@node GDB/MI
|
||||||
@chapter The @sc{gdb/mi} Interface
|
@chapter The @sc{gdb/mi} Interface
|
||||||
|
|
||||||
|
@ -361,36 +361,17 @@ java_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
|||||||
{
|
{
|
||||||
wrap_here (n_spaces (2 + 2 * recurse));
|
wrap_here (n_spaces (2 + 2 * recurse));
|
||||||
}
|
}
|
||||||
if (options->inspect_it)
|
|
||||||
{
|
|
||||||
if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
|
|
||||||
fputs_filtered ("\"( ptr \"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"( nodef \"", stream);
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
|
||||||
language_cplus,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\" \"", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
|
||||||
language_cplus,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\") \"", stream);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
|
||||||
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
if (field_is_static (&TYPE_FIELD (type, i)))
|
||||||
language_cplus,
|
fputs_filtered ("static ", stream);
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||||
annotate_field_name_end ();
|
language_cplus,
|
||||||
fputs_filtered (": ", stream);
|
DMGL_PARAMS | DMGL_ANSI);
|
||||||
annotate_field_value ();
|
annotate_field_name_end ();
|
||||||
}
|
fputs_filtered (": ", stream);
|
||||||
|
annotate_field_value ();
|
||||||
|
|
||||||
if (!field_is_static (&TYPE_FIELD (type, i))
|
if (!field_is_static (&TYPE_FIELD (type, i))
|
||||||
&& TYPE_FIELD_PACKED (type, i))
|
&& TYPE_FIELD_PACKED (type, i))
|
||||||
|
@ -145,10 +145,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
|
|||||||
{
|
{
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\", ", stream);
|
||||||
fputs_filtered ("\\\", ", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\", ", stream);
|
|
||||||
in_quotes = 0;
|
in_quotes = 0;
|
||||||
}
|
}
|
||||||
m2_printchar (string[i], type, stream);
|
m2_printchar (string[i], type, stream);
|
||||||
@ -161,10 +158,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
|
|||||||
{
|
{
|
||||||
if (!in_quotes)
|
if (!in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\"", stream);
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
in_quotes = 1;
|
in_quotes = 1;
|
||||||
}
|
}
|
||||||
LA_EMIT_CHAR (string[i], type, stream, '"');
|
LA_EMIT_CHAR (string[i], type, stream, '"');
|
||||||
@ -174,12 +168,7 @@ m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
|
|||||||
|
|
||||||
/* Terminate the quotes if necessary. */
|
/* Terminate the quotes if necessary. */
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
fputs_filtered ("\"", stream);
|
||||||
if (options->inspect_it)
|
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force_ellipses || i < length)
|
if (force_ellipses || i < length)
|
||||||
fputs_filtered ("...", stream);
|
fputs_filtered ("...", stream);
|
||||||
|
@ -451,7 +451,6 @@ captured_main (void *data)
|
|||||||
{"n", no_argument, &inhibit_gdbinit, 1},
|
{"n", no_argument, &inhibit_gdbinit, 1},
|
||||||
{"batch-silent", no_argument, 0, 'B'},
|
{"batch-silent", no_argument, 0, 'B'},
|
||||||
{"batch", no_argument, &batch_flag, 1},
|
{"batch", no_argument, &batch_flag, 1},
|
||||||
{"epoch", no_argument, &epoch_interface, 1},
|
|
||||||
|
|
||||||
/* This is a synonym for "--annotate=1". --annotate is now
|
/* This is a synonym for "--annotate=1". --annotate is now
|
||||||
preferred, but keep this here for a long time because people
|
preferred, but keep this here for a long time because people
|
||||||
|
@ -396,10 +396,7 @@ objc_printstr (struct ui_file *stream, struct type *type,
|
|||||||
{
|
{
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\", ", stream);
|
||||||
fputs_filtered ("\\\", ", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\", ", stream);
|
|
||||||
in_quotes = 0;
|
in_quotes = 0;
|
||||||
}
|
}
|
||||||
objc_printchar (string[i], type, stream);
|
objc_printchar (string[i], type, stream);
|
||||||
@ -412,10 +409,7 @@ objc_printstr (struct ui_file *stream, struct type *type,
|
|||||||
{
|
{
|
||||||
if (!in_quotes)
|
if (!in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("\"", stream);
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
in_quotes = 1;
|
in_quotes = 1;
|
||||||
}
|
}
|
||||||
objc_emit_char (string[i], type, stream, '"');
|
objc_emit_char (string[i], type, stream, '"');
|
||||||
@ -425,12 +419,7 @@ objc_printstr (struct ui_file *stream, struct type *type,
|
|||||||
|
|
||||||
/* Terminate the quotes if necessary. */
|
/* Terminate the quotes if necessary. */
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
fputs_filtered ("\"", stream);
|
||||||
if (options->inspect_it)
|
|
||||||
fputs_filtered ("\\\"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"", stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force_ellipses || i < length)
|
if (force_ellipses || i < length)
|
||||||
fputs_filtered ("...", stream);
|
fputs_filtered ("...", stream);
|
||||||
|
17
gdb/p-lang.c
17
gdb/p-lang.c
@ -279,10 +279,7 @@ pascal_printstr (struct ui_file *stream, struct type *type,
|
|||||||
{
|
{
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("', ", stream);
|
||||||
fputs_filtered ("\\', ", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("', ", stream);
|
|
||||||
in_quotes = 0;
|
in_quotes = 0;
|
||||||
}
|
}
|
||||||
pascal_printchar (current_char, type, stream);
|
pascal_printchar (current_char, type, stream);
|
||||||
@ -295,10 +292,7 @@ pascal_printstr (struct ui_file *stream, struct type *type,
|
|||||||
{
|
{
|
||||||
if ((!in_quotes) && (PRINT_LITERAL_FORM (current_char)))
|
if ((!in_quotes) && (PRINT_LITERAL_FORM (current_char)))
|
||||||
{
|
{
|
||||||
if (options->inspect_it)
|
fputs_filtered ("'", stream);
|
||||||
fputs_filtered ("\\'", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("'", stream);
|
|
||||||
in_quotes = 1;
|
in_quotes = 1;
|
||||||
}
|
}
|
||||||
pascal_one_char (current_char, stream, &in_quotes);
|
pascal_one_char (current_char, stream, &in_quotes);
|
||||||
@ -308,12 +302,7 @@ pascal_printstr (struct ui_file *stream, struct type *type,
|
|||||||
|
|
||||||
/* Terminate the quotes if necessary. */
|
/* Terminate the quotes if necessary. */
|
||||||
if (in_quotes)
|
if (in_quotes)
|
||||||
{
|
fputs_filtered ("'", stream);
|
||||||
if (options->inspect_it)
|
|
||||||
fputs_filtered ("\\'", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("'", stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force_ellipses || i < length)
|
if (force_ellipses || i < length)
|
||||||
fputs_filtered ("...", stream);
|
fputs_filtered ("...", stream);
|
||||||
|
@ -594,36 +594,17 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
|||||||
{
|
{
|
||||||
wrap_here (n_spaces (2 + 2 * recurse));
|
wrap_here (n_spaces (2 + 2 * recurse));
|
||||||
}
|
}
|
||||||
if (options->inspect_it)
|
|
||||||
{
|
|
||||||
if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
|
|
||||||
fputs_filtered ("\"( ptr \"", stream);
|
|
||||||
else
|
|
||||||
fputs_filtered ("\"( nodef \"", stream);
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
|
||||||
language_cplus,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\" \"", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
|
||||||
language_cplus,
|
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
|
||||||
fputs_filtered ("\") \"", stream);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
|
||||||
|
|
||||||
if (field_is_static (&TYPE_FIELD (type, i)))
|
annotate_field_begin (TYPE_FIELD_TYPE (type, i));
|
||||||
fputs_filtered ("static ", stream);
|
|
||||||
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
if (field_is_static (&TYPE_FIELD (type, i)))
|
||||||
language_cplus,
|
fputs_filtered ("static ", stream);
|
||||||
DMGL_PARAMS | DMGL_ANSI);
|
fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
|
||||||
annotate_field_name_end ();
|
language_cplus,
|
||||||
fputs_filtered (" = ", stream);
|
DMGL_PARAMS | DMGL_ANSI);
|
||||||
annotate_field_value ();
|
annotate_field_name_end ();
|
||||||
}
|
fputs_filtered (" = ", stream);
|
||||||
|
annotate_field_value ();
|
||||||
|
|
||||||
if (!field_is_static (&TYPE_FIELD (type, i))
|
if (!field_is_static (&TYPE_FIELD (type, i))
|
||||||
&& TYPE_FIELD_PACKED (type, i))
|
&& TYPE_FIELD_PACKED (type, i))
|
||||||
|
@ -934,7 +934,7 @@ validate_format (struct format_data fmt, char *cmdname)
|
|||||||
first argument ("/x myvar" for example, to print myvar in hex). */
|
first argument ("/x myvar" for example, to print myvar in hex). */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_command_1 (char *exp, int inspect, int voidprint)
|
print_command_1 (char *exp, int voidprint)
|
||||||
{
|
{
|
||||||
struct expression *expr;
|
struct expression *expr;
|
||||||
struct cleanup *old_chain = 0;
|
struct cleanup *old_chain = 0;
|
||||||
@ -979,17 +979,13 @@ print_command_1 (char *exp, int inspect, int voidprint)
|
|||||||
else
|
else
|
||||||
annotate_value_begin (value_type (val));
|
annotate_value_begin (value_type (val));
|
||||||
|
|
||||||
if (inspect)
|
if (histindex >= 0)
|
||||||
printf_unfiltered ("\031(gdb-makebuffer \"%s\" %d '(\"",
|
|
||||||
exp, histindex);
|
|
||||||
else if (histindex >= 0)
|
|
||||||
printf_filtered ("$%d = ", histindex);
|
printf_filtered ("$%d = ", histindex);
|
||||||
|
|
||||||
if (histindex >= 0)
|
if (histindex >= 0)
|
||||||
annotate_value_history_value ();
|
annotate_value_history_value ();
|
||||||
|
|
||||||
get_formatted_print_options (&opts, format);
|
get_formatted_print_options (&opts, format);
|
||||||
opts.inspect_it = inspect;
|
|
||||||
opts.raw = fmt.raw;
|
opts.raw = fmt.raw;
|
||||||
|
|
||||||
print_formatted (val, fmt.size, &opts, gdb_stdout);
|
print_formatted (val, fmt.size, &opts, gdb_stdout);
|
||||||
@ -999,9 +995,6 @@ print_command_1 (char *exp, int inspect, int voidprint)
|
|||||||
annotate_value_history_end ();
|
annotate_value_history_end ();
|
||||||
else
|
else
|
||||||
annotate_value_end ();
|
annotate_value_end ();
|
||||||
|
|
||||||
if (inspect)
|
|
||||||
printf_unfiltered ("\") )\030");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cleanup)
|
if (cleanup)
|
||||||
@ -1011,23 +1004,14 @@ print_command_1 (char *exp, int inspect, int voidprint)
|
|||||||
static void
|
static void
|
||||||
print_command (char *exp, int from_tty)
|
print_command (char *exp, int from_tty)
|
||||||
{
|
{
|
||||||
print_command_1 (exp, 0, 1);
|
print_command_1 (exp, 1);
|
||||||
}
|
|
||||||
|
|
||||||
/* Same as print, except in epoch, it gets its own window. */
|
|
||||||
static void
|
|
||||||
inspect_command (char *exp, int from_tty)
|
|
||||||
{
|
|
||||||
extern int epoch_interface;
|
|
||||||
|
|
||||||
print_command_1 (exp, epoch_interface, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Same as print, except it doesn't print void results. */
|
/* Same as print, except it doesn't print void results. */
|
||||||
static void
|
static void
|
||||||
call_command (char *exp, int from_tty)
|
call_command (char *exp, int from_tty)
|
||||||
{
|
{
|
||||||
print_command_1 (exp, 0, 0);
|
print_command_1 (exp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -2600,11 +2584,7 @@ EXP may be preceded with /FMT, where FMT is a format letter\n\
|
|||||||
but no count or size letter (see \"x\" command)."));
|
but no count or size letter (see \"x\" command)."));
|
||||||
set_cmd_completer (c, expression_completer);
|
set_cmd_completer (c, expression_completer);
|
||||||
add_com_alias ("p", "print", class_vars, 1);
|
add_com_alias ("p", "print", class_vars, 1);
|
||||||
|
add_com_alias ("inspect", "print", class_vars, 1);
|
||||||
c = add_com ("inspect", class_vars, inspect_command, _("\
|
|
||||||
Same as \"print\" command, except that if you are running in the epoch\n\
|
|
||||||
environment, the value is printed in its own window."));
|
|
||||||
set_cmd_completer (c, expression_completer);
|
|
||||||
|
|
||||||
add_setshow_uinteger_cmd ("max-symbolic-offset", no_class,
|
add_setshow_uinteger_cmd ("max-symbolic-offset", no_class,
|
||||||
&max_symbolic_offset, _("\
|
&max_symbolic_offset, _("\
|
||||||
|
@ -138,8 +138,6 @@ char gdb_dirbuf[1024];
|
|||||||
|
|
||||||
void (*window_hook) (FILE *, char *);
|
void (*window_hook) (FILE *, char *);
|
||||||
|
|
||||||
int epoch_interface;
|
|
||||||
|
|
||||||
/* Buffer used for reading command lines, and the size
|
/* Buffer used for reading command lines, and the size
|
||||||
allocated for it so far. */
|
allocated for it so far. */
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ extern int in_user_command;
|
|||||||
extern int confirm;
|
extern int confirm;
|
||||||
extern char gdb_dirbuf[1024];
|
extern char gdb_dirbuf[1024];
|
||||||
extern int inhibit_gdbinit;
|
extern int inhibit_gdbinit;
|
||||||
extern int epoch_interface;
|
|
||||||
extern char gdbinit[];
|
extern char gdbinit[];
|
||||||
|
|
||||||
extern void print_gdb_version (struct ui_file *);
|
extern void print_gdb_version (struct ui_file *);
|
||||||
|
@ -116,7 +116,6 @@ struct value_print_options user_print_options =
|
|||||||
0, /* output_format */
|
0, /* output_format */
|
||||||
0, /* format */
|
0, /* format */
|
||||||
0, /* stop_print_at_null */
|
0, /* stop_print_at_null */
|
||||||
0, /* inspect_it */
|
|
||||||
0, /* print_array_indexes */
|
0, /* print_array_indexes */
|
||||||
0, /* deref_ref */
|
0, /* deref_ref */
|
||||||
1, /* static_field_print */
|
1, /* static_field_print */
|
||||||
@ -2211,8 +2210,6 @@ print_converted_chars_to_obstack (struct obstack *obstack,
|
|||||||
must output and a comma and a quote. */
|
must output and a comma and a quote. */
|
||||||
if (last != START)
|
if (last != START)
|
||||||
obstack_grow_wstr (obstack, LCST (", "));
|
obstack_grow_wstr (obstack, LCST (", "));
|
||||||
if (options->inspect_it)
|
|
||||||
obstack_grow_wstr (obstack, LCST ("\\"));
|
|
||||||
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
||||||
}
|
}
|
||||||
/* Output the character. */
|
/* Output the character. */
|
||||||
@ -2240,8 +2237,6 @@ print_converted_chars_to_obstack (struct obstack *obstack,
|
|||||||
{
|
{
|
||||||
/* We were outputting a single string. Terminate the
|
/* We were outputting a single string. Terminate the
|
||||||
string. */
|
string. */
|
||||||
if (options->inspect_it)
|
|
||||||
obstack_grow_wstr (obstack, LCST ("\\"));
|
|
||||||
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
||||||
}
|
}
|
||||||
if (last != START)
|
if (last != START)
|
||||||
@ -2272,8 +2267,6 @@ print_converted_chars_to_obstack (struct obstack *obstack,
|
|||||||
{
|
{
|
||||||
/* If we were outputting a string of SINGLE characters,
|
/* If we were outputting a string of SINGLE characters,
|
||||||
terminate the quote. */
|
terminate the quote. */
|
||||||
if (options->inspect_it)
|
|
||||||
obstack_grow_wstr (obstack, LCST ("\\"));
|
|
||||||
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
||||||
}
|
}
|
||||||
if (last != START)
|
if (last != START)
|
||||||
@ -2294,11 +2287,7 @@ print_converted_chars_to_obstack (struct obstack *obstack,
|
|||||||
characters, the string must be terminated. Otherwise,
|
characters, the string must be terminated. Otherwise,
|
||||||
REPEAT and INCOMPLETE are always left properly terminated. */
|
REPEAT and INCOMPLETE are always left properly terminated. */
|
||||||
if (last == SINGLE)
|
if (last == SINGLE)
|
||||||
{
|
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
||||||
if (options->inspect_it)
|
|
||||||
obstack_grow_wstr (obstack, LCST ("\\"));
|
|
||||||
obstack_grow (obstack, &wide_quote_char, sizeof (gdb_wchar_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -66,9 +66,6 @@ struct value_print_options
|
|||||||
/* Stop printing at null character? */
|
/* Stop printing at null character? */
|
||||||
int stop_print_at_null;
|
int stop_print_at_null;
|
||||||
|
|
||||||
/* True if this value is being printed in an epoch window. */
|
|
||||||
int inspect_it;
|
|
||||||
|
|
||||||
/* True if we should print the index of each element when printing
|
/* True if we should print the index of each element when printing
|
||||||
an array. */
|
an array. */
|
||||||
int print_array_indexes;
|
int print_array_indexes;
|
||||||
@ -156,9 +153,10 @@ extern void print_function_pointer_address (const struct value_print_options *op
|
|||||||
CORE_ADDR address,
|
CORE_ADDR address,
|
||||||
struct ui_file *stream);
|
struct ui_file *stream);
|
||||||
|
|
||||||
int read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit,
|
extern int read_string (CORE_ADDR addr, int len, int width,
|
||||||
enum bfd_endian byte_order, gdb_byte **buffer,
|
unsigned int fetchlimit,
|
||||||
int *bytes_read);
|
enum bfd_endian byte_order, gdb_byte **buffer,
|
||||||
|
int *bytes_read);
|
||||||
|
|
||||||
extern void val_print_optimized_out (struct ui_file *stream);
|
extern void val_print_optimized_out (struct ui_file *stream);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user