Also removes an unnecessary declaration of cmdlist in cli-cmds.c.
I don't understand why it is there, the definition of cmdlist is
at the top of the same file.
gdb/ChangeLog:
2019-10-12 Christian Biesinger <cbiesinger@google.com>
* cli/cli-cmds.c (max_user_call_depth): Move comment to header.
(show_user): Remove declaration of cmdlist.
* cli/cli-cmds.h (max_user_call_depth): Declare.
* cli/cli-script.c (execute_user_command): Remove declaration
of max_user_call_depth.
+2019-10-12 Christian Biesinger <cbiesinger@google.com>
+
+ * cli/cli-cmds.c (max_user_call_depth): Move comment to header.
+ (show_user): Remove declaration of cmdlist.
+ * cli/cli-cmds.h (max_user_call_depth): Declare.
+ * cli/cli-script.c (execute_user_command): Remove declaration
+ of max_user_call_depth.
+
2019-10-11 Jim Wilson <jimw@sifive.com>
* gdbsupport/print-utils.h (pulongest): Fix comment.
static void filter_sals (std::vector<symtab_and_line> &);
\f
-/* Limit the call depth of user-defined commands */
+/* See cli-cmds.h. */
unsigned int max_user_call_depth;
/* Define all cmd_list_elements. */
show_user (const char *args, int from_tty)
{
struct cmd_list_element *c;
- extern struct cmd_list_element *cmdlist;
if (args)
{
extern struct cmd_list_element *showchecklist;
+/* Limit the call depth of user-defined commands */
+
+extern unsigned int max_user_call_depth;
+
/* Exported to gdb/top.c */
void init_cmd_lists (void);
execute_user_command (struct cmd_list_element *c, const char *args)
{
counted_command_line cmdlines_copy;
- extern unsigned int max_user_call_depth;
/* Ensure that the user commands can't be deleted while they are
executing. */