* [RFA] Remove output_command_const
@ 2018-05-05 15:40 Tom Tromey
2018-05-21 16:31 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2018-05-05 15:40 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I happened to notice that output_command_const still exists, but is
not needed any more -- commands are always const-correct now. This
patch removes this leftover.
ChangeLog
2018-05-04 Tom Tromey <tom@tromey.com>
* printcmd.c (output_command): Remove.
(output_command_const): Rename to output_command.
* valprint.h (output_command): Rename from output_command_const.
* tracepoint.c (trace_dump_actions): Call output_command.
---
gdb/ChangeLog | 7 +++++++
gdb/printcmd.c | 10 +---------
gdb/tracepoint.c | 2 +-
gdb/valprint.h | 2 +-
4 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 4696373b2c..0dfea34753 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1221,16 +1221,8 @@ call_command (const char *exp, int from_tty)
/* Implementation of the "output" command. */
-static void
-output_command (const char *exp, int from_tty)
-{
- output_command_const (exp, from_tty);
-}
-
-/* Like output_command, but takes a const string as argument. */
-
void
-output_command_const (const char *exp, int from_tty)
+output_command (const char *exp, int from_tty)
{
char format = 0;
struct value *val;
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index e170d704bc..7636fdb023 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -2723,7 +2723,7 @@ trace_dump_actions (struct command_line *action,
}
printf_filtered ("%s = ", cmd);
- output_command_const (cmd, from_tty);
+ output_command (cmd, from_tty);
printf_filtered ("\n");
}
action_exp = next_comma;
diff --git a/gdb/valprint.h b/gdb/valprint.h
index f005c31f87..1f62039be5 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -210,7 +210,7 @@ extern void generic_printstr (struct ui_file *stream, struct type *type,
arguments passed to all command implementations, except ARGS is
const. */
-extern void output_command_const (const char *args, int from_tty);
+extern void output_command (const char *args, int from_tty);
extern int val_print_scalar_type_p (struct type *type);
--
2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Remove output_command_const
2018-05-05 15:40 [RFA] Remove output_command_const Tom Tromey
@ 2018-05-21 16:31 ` Tom Tromey
2018-05-21 19:47 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2018-05-21 16:31 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> I happened to notice that output_command_const still exists, but is
Tom> not needed any more -- commands are always const-correct now. This
Tom> patch removes this leftover.
Ping.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Remove output_command_const
2018-05-21 16:31 ` Tom Tromey
@ 2018-05-21 19:47 ` Joel Brobecker
2018-05-21 20:27 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2018-05-21 19:47 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> >>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
>
> Tom> I happened to notice that output_command_const still exists, but is
> Tom> not needed any more -- commands are always const-correct now. This
> Tom> patch removes this leftover.
>
> Ping.
Sorry Tom. Looks good to me. I'm trying to think of reasons why
we wouldn't be allowed to treat this as abvious, and can't think of
anything... Can anyone else?
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Remove output_command_const
2018-05-21 19:47 ` Joel Brobecker
@ 2018-05-21 20:27 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2018-05-21 20:27 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Tom Tromey, gdb-patches
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
>> >>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
>>
Tom> I happened to notice that output_command_const still exists, but is
Tom> not needed any more -- commands are always const-correct now. This
Tom> patch removes this leftover.
>>
>> Ping.
Joel> Sorry Tom. Looks good to me. I'm trying to think of reasons why
Joel> we wouldn't be allowed to treat this as abvious, and can't think of
Joel> anything... Can anyone else?
Yeah, I probably should've used the obvious rule for this one.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-21 19:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 15:40 [RFA] Remove output_command_const Tom Tromey
2018-05-21 16:31 ` Tom Tromey
2018-05-21 19:47 ` Joel Brobecker
2018-05-21 20:27 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox