* [RFA 3/3] Document 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 [RFA 0/3] Better control about frame information to print Philippe Waroquiers
2019-05-04 21:57 ` [RFA 2/3] Test 'set print frame-info|frame-arguments presence' Philippe Waroquiers
@ 2019-05-04 21:57 ` Philippe Waroquiers
2019-05-05 16:43 ` Eli Zaretskii
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
2 siblings, 1 reply; 7+ messages in thread
From: Philippe Waroquiers @ 2019-05-04 21:57 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
---
gdb/NEWS | 12 +++++++++++
gdb/doc/ChangeLog | 5 +++++
gdb/doc/gdb.texinfo | 51 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 68 insertions(+)
diff --git a/gdb/NEWS b/gdb/NEWS
index b21b2cbb47..893b220acc 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -48,6 +48,18 @@ show may-call-functions
an error when a command (such as print expression) calls a function
in the program.
+set print frame-info [short_loc|location|loc_and_address|src_and_loc
+ |src_line|auto]
+show print frame-info
+ This controls what frame information is printed by the commands printing
+ a frame.
+
+* Changed commands
+
+set print frame-arguments
+ The new value 'presence' indicates to only indicate the presence of
+ arguments using ..., instead of printing argument names and values.
+
*** Changes in GDB 8.3
* GDB and GDBserver now support access to additional registers on
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index a26e20c823..53ba452a7f 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -12825,3 +12825,8 @@ fill-column: 74
version-control: never
coding: utf-8
End:
+2019-05-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * gdb.texinfo (Print Settings): Document 'set|show print frame-info'.
+ (Backtraces): Reference 'set print frame-info'.
+
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dd8ae91b93..5d065c9c79 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7554,6 +7554,8 @@ The value of parameter @code{data} in frame 1 has been replaced by
only if it is a scalar (integer, pointer, enumeration, etc). See command
@kbd{set print frame-arguments} in @ref{Print Settings} for more details
on how to configure the way function parameter values are printed.
+The command @kbd{set print frame-info} (see @ref{Print Settings}) controls
+what frame information is printed.
@cindex optimized out, in backtrace
@cindex function call arguments, optimized out
@@ -10386,6 +10388,7 @@ If the number is 0, then the printing is unlimited.
@cindex print all frame argument values
@cindex print frame argument values for scalars only
@cindex do not print frame argument values
+@cindex do not print frame argument names
This command allows to control how the values of arguments are printed
when the debugger prints a frame (@pxref{Frames}). The possible
values are:
@@ -10413,6 +10416,17 @@ is replaced by @code{@dots{}}. In this case, the example above now becomes:
#1 0x08048361 in call_me (i=@dots{}, s=@dots{}, ss=@dots{}, u=@dots{}, e=@dots{})
at frame-args.c:23
@end smallexample
+
+@item presence
+Only the presence of arguments is signaled by @code{@dots{}}.
+The @dots{} are not printed for function without any arguments.
+None of the argument names and values are printed.
+In this case, the example above now becomes:
+
+@smallexample
+#1 0x08048361 in call_me (@dots{}) at frame-args.c:23
+@end smallexample
+
@end table
By default, only scalar arguments are printed. This command can be used
@@ -10556,6 +10570,43 @@ entry resolution see @ref{set debug entry-values}.
Show the method being used for printing of frame argument values at function
entry.
+@item set print frame-info @var{value}
+@kindex set print frame-info
+@cindex printing frame information
+@cindex frame information, printing
+This command allows to control the information printed when
+the debugger prints a frame. See @ref{Frames} and @ref{Backtrace}
+for a general explanation about frames and frame information.
+Note that some other settings (such as @code{set print frame-arguments}
+and @code{set print address}) are also influencing if and how some frame
+information is displayed. In particular, the frame program counter is never
+printed if @code{set print address} is off.
+
+The possible values for @code{set print frame-info} are:
+@table @code
+@item short_loc
+Print the frame level, the program counter if not at the
+beginning of the location source line, the function, the function
+arguments.
+@item location
+Same as @code{short_loc} but also print the source file and source line
+number.
+@item loc_and_address
+Same as @code{location} but print the program counter even if located at the
+beginning of the location source line.
+@item src_line
+Print the program counter if not at the beginning of the location
+source line, the line number and the source line.
+@item src_and_loc
+Print what @code{location} and @code{src_line} are printing.
+@item auto
+The information printed for a frame is decided automatically
+by the @value{GDBN} command that prints a frame.
+For example, @code{frame} prints the information printed by
+@code{src_and_loc} while @code{stepi} will switch between
+@code{src_line} and @code{src_and_loc} depending on the program counter.
+@end table
+
@item set print repeats @var{number-of-repeats}
@itemx set print repeats unlimited
@cindex repeated array elements
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFA 0/3] Better control about frame information to print.
@ 2019-05-04 21:57 Philippe Waroquiers
2019-05-04 21:57 ` [RFA 2/3] Test 'set print frame-info|frame-arguments presence' Philippe Waroquiers
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Philippe Waroquiers @ 2019-05-04 21:57 UTC (permalink / raw)
To: gdb-patches
When printing big stacktraces having a lot of functions with a lot of
arguments, it can be handy to see a lot less information in the
printed frames.
With the new settings, it is possible to have backtraces such as:
(gdb) bt
#0 break_me ()
#1 call_me (...)
#2 main ()
(gdb)
that are only showing the level, the function name and the presence of
arguments.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFA 1/3] Implement 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 [RFA 0/3] Better control about frame information to print Philippe Waroquiers
2019-05-04 21:57 ` [RFA 2/3] Test 'set print frame-info|frame-arguments presence' Philippe Waroquiers
2019-05-04 21:57 ` [RFA 3/3] Document " Philippe Waroquiers
@ 2019-05-04 21:57 ` Philippe Waroquiers
2019-05-05 20:24 ` Andreas Schwab
2019-05-06 19:43 ` Tom Tromey
2 siblings, 2 replies; 7+ messages in thread
From: Philippe Waroquiers @ 2019-05-04 21:57 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
New settings allow to better control what frame information is printed.
'set print frame-info' allows to override the default frame information
printed when a GDB command prints a frame.
It is now possible to have very short frame information by using the
new 'set print frame-arguments presence' and 'set print frame-info short_loc'.
Combined with 'set print address off', a backtrace will only show
the essential information to see the function call chain, e.g.:
(gdb) set print address off
(gdb) set print frame-arguments presence
(gdb) set print frame-info short_loc
(gdb) bt
#0 break_me ()
#1 call_me (...)
#2 main ()
(gdb)
This is handy in particular for big backtraces with functions having
many arguments.
---
gdb/ChangeLog | 14 +++++++++
gdb/frame.h | 28 +++++++++++------
gdb/stack.c | 86 ++++++++++++++++++++++++++++++++++++++++++---------
3 files changed, 104 insertions(+), 24 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 09a4a0af5a..dd214b47fa 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -6297,3 +6297,17 @@ version-control: never
coding: utf-8
End:
+2019-05-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * NEWS: Mention 'set|show print frame-info'. Mention new
+ 'presence' value for 'frame-arguments'.
+ * frame.h (enum print_what): New value 'SHORT_LOCATION', update
+ comments.
+ * stack.c (print_frame_arguments_choices): New value 'presence'.
+ (print_frame_args): Only print dots for args if print frame-arguments
+ is 'presence'.
+ (print_what_frame_info_string, print_what_frame_info)
+ (set_print_frame_info_command): New variables and function.
+ (print_frame_info): Update comment. Use print_what_frame_info
+ to decide what to print.
+ (_initialize_stack): Call add_setshow_enum_cmd for frame-info.
diff --git a/gdb/frame.h b/gdb/frame.h
index 0a0baf46a0..4c0ee4d53e 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -675,18 +675,28 @@ extern struct gdbarch *frame_unwind_arch (frame_info *next_frame);
extern struct gdbarch *frame_unwind_caller_arch (struct frame_info *frame);
-/* Values for the source flag to be used in print_frame_info_base(). */
+/* Values for the source flag to be used in print_frame_info ().
+ For all the cases below, the address is never printed if
+ 'set print address' is off. When 'set print address' is on,
+ the address is printed if the program counter is not at the
+ beginning of the source line of the frame
+ and PRINT_WHAT is != LOC_AND_ADDRESS. */
enum print_what
- {
- /* Print only the source line, like in stepi. */
- SRC_LINE = -1,
- /* Print only the location, i.e. level, address (sometimes)
- function, args, file, line, line num. */
+ {
+ /* Print only the address, source line, like in stepi. */
+ SRC_LINE = -1,
+ /* Print only the location, i.e. level, address,
+ function, args (as controlled by 'set print frame-arguments'),
+ file, line, line num. */
LOCATION,
/* Print both of the above. */
- SRC_AND_LOC,
- /* Print location only, but always include the address. */
- LOC_AND_ADDRESS
+ SRC_AND_LOC,
+ /* Print location only, print the address even if the program counter
+ is at the beginning of the source line. */
+ LOC_AND_ADDRESS,
+ /* Print only level and function,
+ i.e. location only, without address, file, line, line num. */
+ SHORT_LOCATION
};
/* Allocate zero initialized memory from the frame cache obstack.
diff --git a/gdb/stack.c b/gdb/stack.c
index e5de10949d..495642a83b 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -57,7 +57,7 @@
of this setting. */
static const char *const print_frame_arguments_choices[] =
- {"all", "scalars", "none", NULL};
+ {"all", "scalars", "none", "presence", NULL};
static const char *print_frame_arguments = "scalars";
/* If non-zero, don't invoke pretty-printers for frame arguments. */
@@ -539,8 +539,11 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
long highest_offset = -1;
/* Number of ints of arguments that we have printed so far. */
int args_printed = 0;
+ /* True if we should print arg names. If false, we only indicate
+ the presence of arguments by printing ellipsis. */
+ int print_names = strcmp (print_frame_arguments, "presence");
/* True if we should print arguments, false otherwise. */
- int print_args = strcmp (print_frame_arguments, "none");
+ int print_args = print_names && strcmp (print_frame_arguments, "none");
if (func)
{
@@ -560,6 +563,13 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
if (!SYMBOL_IS_ARGUMENT (sym))
continue;
+ if (!print_names)
+ {
+ uiout->text ("...");
+ first = 0;
+ break;
+ }
+
switch (SYMBOL_CLASS (sym))
{
case LOC_ARG:
@@ -708,8 +718,11 @@ print_frame_args (struct symbol *func, struct frame_info *frame,
else
start = highest_offset;
- print_frame_nameless_args (frame, start, num - args_printed,
- first, stream);
+ if (!print_names && !first && num > 0)
+ uiout->text ("...");
+ else
+ print_frame_nameless_args (frame, start, num - args_printed,
+ first, stream);
}
}
@@ -766,13 +779,42 @@ do_gdb_disassembly (struct gdbarch *gdbarch,
}
}
+/* The possible choices of "set print frame-info", and the value
+ of this setting. */
+
+static const char *const print_frame_info_choices[] =
+ {"src_line", "location", "src_and_loc", "loc_and_address", "short_loc",
+ "auto", NULL};
+static const char *print_what_frame_info_string = "auto";
+static gdb::optional<enum print_what> print_what_frame_info;
+
+/* Set command. Change the current frame info to print. */
+
+static void
+set_print_frame_info_command (const char *ignore,
+ int from_tty, struct cmd_list_element *c)
+{
+ if (strcmp (print_what_frame_info_string, "src_line") == 0)
+ print_what_frame_info = SRC_LINE;
+ else if (strcmp (print_what_frame_info_string, "location") == 0)
+ print_what_frame_info = LOCATION;
+ else if (strcmp (print_what_frame_info_string, "src_and_loc") == 0)
+ print_what_frame_info = SRC_AND_LOC;
+ else if (strcmp (print_what_frame_info_string, "loc_and_address") == 0)
+ print_what_frame_info = LOC_AND_ADDRESS;
+ else if (strcmp (print_what_frame_info_string, "short_loc") == 0)
+ print_what_frame_info = SHORT_LOCATION;
+ else if (strcmp (print_what_frame_info_string, "auto") == 0)
+ print_what_frame_info.reset ();
+ else
+ internal_error (__FILE__, __LINE__,
+ "Unexpected set print frame-info `%s'.",
+ print_what_frame_info_string);
+}
+
/* Print information about frame FRAME. The output is format according
- to PRINT_LEVEL and PRINT_WHAT and PRINT_ARGS. The meaning of
- PRINT_WHAT is:
-
- SRC_LINE: Print only source line.
- LOCATION: Print only location.
- SRC_AND_LOC: Print location and source line.
+ to PRINT_LEVEL and PRINT_WHAT and PRINT_ARGS. For the meaning of
+ PRINT_WHAT, see enum print_what comments in frame.h.
Used in "where" output, and to emit breakpoint or step
messages. */
@@ -787,6 +829,12 @@ print_frame_info (struct frame_info *frame, int print_level,
int location_print;
struct ui_out *uiout = current_uiout;
+ if (!current_uiout->is_mi_like_p () && print_what_frame_info.has_value ())
+ {
+ /* Use the specific frame information desired by the user. */
+ print_what = *print_what_frame_info;
+ }
+
if (get_frame_type (frame) == DUMMY_FRAME
|| get_frame_type (frame) == SIGTRAMP_FRAME
|| get_frame_type (frame) == ARCH_FRAME)
@@ -850,10 +898,10 @@ print_frame_info (struct frame_info *frame, int print_level,
to get the line containing FRAME->pc. */
symtab_and_line sal = find_frame_sal (frame);
- location_print = (print_what == LOCATION
+ location_print = (print_what == LOCATION
+ || print_what == SRC_AND_LOC
|| print_what == LOC_AND_ADDRESS
- || print_what == SRC_AND_LOC);
-
+ || print_what == SHORT_LOCATION);
if (location_print || !sal.symtab)
print_frame (frame, print_level, print_what, print_args, sal);
@@ -1210,7 +1258,7 @@ print_frame (struct frame_info *frame, int print_level,
QUIT;
}
uiout->text (")");
- if (sal.symtab)
+ if (print_what != SHORT_LOCATION && sal.symtab)
{
const char *filename_display;
@@ -1233,7 +1281,8 @@ print_frame (struct frame_info *frame, int print_level,
annotate_frame_source_end ();
}
- if (pc_p && (funname == NULL || sal.symtab == NULL))
+ if (print_what != SHORT_LOCATION
+ && pc_p && (funname == NULL || sal.symtab == NULL))
{
char *lib = solib_name_from_address (get_frame_program_space (frame),
get_frame_pc (frame));
@@ -3106,6 +3155,13 @@ Usage: func NAME"));
_("Show printing of non-scalar frame arguments"),
NULL, NULL, NULL, &setprintlist, &showprintlist);
+ add_setshow_enum_cmd ("frame-info", class_stack,
+ print_frame_info_choices, &print_what_frame_info_string,
+ _("Set printing of frame information"),
+ _("Show printing of frame information"),
+ NULL, set_print_frame_info_command, NULL,
+ &setprintlist, &showprintlist);
+
add_setshow_boolean_cmd ("frame-arguments", no_class,
&print_raw_frame_arguments, _("\
Set whether to print frame arguments in raw form."), _("\
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFA 2/3] Test 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 [RFA 0/3] Better control about frame information to print Philippe Waroquiers
@ 2019-05-04 21:57 ` Philippe Waroquiers
2019-05-04 21:57 ` [RFA 3/3] Document " Philippe Waroquiers
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
2 siblings, 0 replies; 7+ messages in thread
From: Philippe Waroquiers @ 2019-05-04 21:57 UTC (permalink / raw)
To: gdb-patches; +Cc: Philippe Waroquiers
---
gdb/testsuite/ChangeLog | 4 ++
gdb/testsuite/gdb.base/frame-args.exp | 56 +++++++++++++++++++++++++++
2 files changed, 60 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 729cc520d7..68c58f402d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -15864,3 +15864,7 @@ For older changes see ChangeLog-1993-2013.
Copyright 2014-2019 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
+2019-05-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * gdb.base/frame-args.exp: Test new 'frame-arguments presence'.
+ Test new 'set print frame-info'.
diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp
index 77f136c064..a7fd90c523 100644
--- a/gdb/testsuite/gdb.base/frame-args.exp
+++ b/gdb/testsuite/gdb.base/frame-args.exp
@@ -50,4 +50,60 @@ gdb_test "frame 1" \
".*in call_me \\(i=\\.\\.\\., f=\\.\\.\\., s=\\.\\.\\., ss=\\.\\.\\., u=\\.\\.\\., e=\\.\\.\\.\\) at .*frame-args\\.c:.*" \
"frame 1 with print frame-arguments set to none"
+# Test with "print frame-arguments" set to "presence"
+
+gdb_test_no_output "set print frame-arguments presence" \
+ "set print frame-arguments presence"
+gdb_test "frame 1" \
+ ".*in call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
+ "frame 1 with print frame-arguments set to presence"
+gdb_test "frame 2" \
+ ".*in main \\(\\) at .*frame-args\\.c:.*" \
+ "frame 2 (no args) with print frame-arguments set to presence"
+
+
+# Test with "print frame-info" set to "loc_and_address"
+gdb_test_no_output "set print frame-info loc_and_address" \
+ "set print frame-info loc_and_address"
+gdb_test "frame 1" \
+ ".*0x.* in call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
+ "frame 1 with print frame-info set to loc_and_address"
+
+# Test with "print address" set to "off" ...
+gdb_test_no_output "set print address off" \
+ "set print address off"
+
+# ... and "loc_and_address (previously set)
+gdb_test "frame 1" \
+ "#1 call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
+ "frame 1 with print frame-info set to loc_and_address and address off"
+
+# ... and "location"
+gdb_test_no_output "set print frame-info location" \
+ "set print frame-info location"
+gdb_test "frame 1" \
+ "#1 call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*" \
+ "frame 1 with print frame-info set to location and address off"
+
+# ... and "short_loc"
+gdb_test_no_output "set print frame-info short_loc" \
+ "set print frame-info short_loc"
+gdb_test "frame 1" \
+ "#1 call_me \\(\\.\\.\\.\\)" \
+ "frame 1 with print frame-info set to short_loc and address off"
+
+# ... and "src_and_loc"
+gdb_test_no_output "set print frame-info src_and_loc" \
+ "set print frame-info src_and_loc"
+gdb_test "frame 1" \
+ "#1 call_me \\(\\.\\.\\.\\) at .*frame-args\\.c:.*\r\n\[1-9\]\[0-9\]*\[ \t\]*break_me \\(\\);" \
+ "frame 1 with print frame-info set to src_and_loc and address off"
+
+# ... and "src_line".
+gdb_test_no_output "set print frame-info src_line" \
+ "set print frame-info src_line"
+gdb_test "frame 1" \
+ "\[1-9\]\[0-9\]*\[ \t\]*break_me \\(\\);" \
+ "frame 1 with print frame-info set to src_line and address off"
+
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA 3/3] Document 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 ` [RFA 3/3] Document " Philippe Waroquiers
@ 2019-05-05 16:43 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2019-05-05 16:43 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
> From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Date: Sat, 4 May 2019 23:55:38 +0200
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index b21b2cbb47..893b220acc 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -48,6 +48,18 @@ show may-call-functions
> an error when a command (such as print expression) calls a function
> in the program.
>
> +set print frame-info [short_loc|location|loc_and_address|src_and_loc
> + |src_line|auto]
> +show print frame-info
> + This controls what frame information is printed by the commands printing
> + a frame.
How about a couple of examples of commands that will be sensitive to
this setting?
> +The command @kbd{set print frame-info} (see @ref{Print Settings}) controls
> +what frame information is printed. ^^^^^^^^
Please use @pxref instead of "see @ref" there.
> @cindex do not print frame argument values
> +@cindex do not print frame argument names
These two entries are too similar to be useful. I suggest to leave
just one, saying "do not print frame arguments".
> +@item presence
> +Only the presence of arguments is signaled by @code{@dots{}}.
^^^^^^^^
"indicated"
> +the debugger prints a frame. See @ref{Frames} and @ref{Backtrace}
^ ^
A comma (or a period) should follow the closing braces.
> +for a general explanation about frames and frame information.
> +Note that some other settings (such as @code{set print frame-arguments}
> +Print the frame level, the program counter if not at the
^
A comma is missing there.
> +beginning of the location source line, the function, the function
> +arguments.
> +@item location
> +Same as @code{short_loc} but also print the source file and source line
> +number.
> +@item loc_and_address
> +Same as @code{location} but print the program counter even if located at the
> +beginning of the location source line.
> +@item src_line
> +Print the program counter if not at the beginning of the location
> +source line, the line number and the source line.
> +@item src_and_loc
> +Print what @code{location} and @code{src_line} are printing.
> +@item auto
> +The information printed for a frame is decided automatically
> +by the @value{GDBN} command that prints a frame.
> +For example, @code{frame} prints the information printed by
> +@code{src_and_loc} while @code{stepi} will switch between
> +@code{src_line} and @code{src_and_loc} depending on the program counter.
Please state what is the default.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA 1/3] Implement 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
@ 2019-05-05 20:24 ` Andreas Schwab
2019-05-06 19:43 ` Tom Tromey
1 sibling, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2019-05-05 20:24 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
On Mai 04 2019, Philippe Waroquiers <philippe.waroquiers@skynet.be> wrote:
> @@ -766,13 +779,42 @@ do_gdb_disassembly (struct gdbarch *gdbarch,
> }
> }
>
> +/* The possible choices of "set print frame-info", and the value
> + of this setting. */
> +
> +static const char *const print_frame_info_choices[] =
> + {"src_line", "location", "src_and_loc", "loc_and_address", "short_loc",
> + "auto", NULL};
I think it would be nicer to use dashes instead of underscores, and not
abbreviate the words.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFA 1/3] Implement 'set print frame-info|frame-arguments presence'.
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
2019-05-05 20:24 ` Andreas Schwab
@ 2019-05-06 19:43 ` Tom Tromey
1 sibling, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2019-05-06 19:43 UTC (permalink / raw)
To: Philippe Waroquiers; +Cc: gdb-patches
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> New settings allow to better control what frame information is printed.
Philippe> 'set print frame-info' allows to override the default frame information
Philippe> printed when a GDB command prints a frame.
Philippe> It is now possible to have very short frame information by using the
Philippe> new 'set print frame-arguments presence' and 'set print frame-info short_loc'.
I didn't read the patch in detail yet, but I noticed this:
Philippe> + * stack.c (print_frame_arguments_choices): New value 'presence'.
Philippe> + (print_frame_args): Only print dots for args if print frame-arguments
Philippe> + is 'presence'.
Philippe> + (print_what_frame_info_string, print_what_frame_info)
Philippe> + (set_print_frame_info_command): New variables and function.
Philippe> + (print_frame_info): Update comment. Use print_what_frame_info
Philippe> + to decide what to print.
There's a whole separate set of frame-printing functions in
python/py-framefilter.c. Those must be updated as well.
thanks,
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-05-06 19:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-04 21:57 [RFA 0/3] Better control about frame information to print Philippe Waroquiers
2019-05-04 21:57 ` [RFA 2/3] Test 'set print frame-info|frame-arguments presence' Philippe Waroquiers
2019-05-04 21:57 ` [RFA 3/3] Document " Philippe Waroquiers
2019-05-05 16:43 ` Eli Zaretskii
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
2019-05-05 20:24 ` Andreas Schwab
2019-05-06 19:43 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox