[1/7] gdb: remove unused argument from gdb_init

Message ID 27451f97b68a4a06e7c9b20f13327591931431b0.1619125261.git.andrew.burgess@embecosm.com
State New
Headers show
Series
  • New options to control how Python is initialized
Related show

Commit Message

Andrew Burgess April 22, 2021, 9:02 p.m.
The argument to gdb_init is not used, remove it.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* main.c (captured_main_1): Don't pass argument to gdb_init.
	* top.c (gdb_init): Remove unused argument, and add header
	comment.
	* top.h (gdb_init): Remove argument.
---
 gdb/ChangeLog | 7 +++++++
 gdb/main.c    | 2 +-
 gdb/top.c     | 4 +++-
 gdb/top.h     | 2 +-
 4 files changed, 12 insertions(+), 3 deletions(-)

-- 
2.25.4

Comments

Tom Tromey April 23, 2021, 2:15 p.m. | #1
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:


Andrew> The argument to gdb_init is not used, remove it.
Andrew> There should be no user visible changes after this commit.

Andrew> gdb/ChangeLog:

Andrew> 	* main.c (captured_main_1): Don't pass argument to gdb_init.
Andrew> 	* top.c (gdb_init): Remove unused argument, and add header
Andrew> 	comment.
Andrew> 	* top.h (gdb_init): Remove argument.

Looks good, obvious even.  Thanks.

Tom

Patch

diff --git a/gdb/main.c b/gdb/main.c
index 60c08fb83dd..652e6f76fa0 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -1039,7 +1039,7 @@  captured_main_1 (struct captured_main_args *context)
   gdb::alternate_signal_stack signal_stack;
 
   /* Initialize all files.  */
-  gdb_init (gdb_program_name);
+  gdb_init ();
 
   /* Process early init files and early init options from the command line.  */
   if (!inhibit_gdbinit)
diff --git a/gdb/top.c b/gdb/top.c
index ecd90a1433a..b58cd4facfc 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -2360,8 +2360,10 @@  The second argument is the terminal the UI runs on."), &cmdlist);
   set_cmd_completer (c, interpreter_completer);
 }
 
+/* See top.h.  */
+
 void
-gdb_init (char *argv0)
+gdb_init ()
 {
   saved_command_line = xstrdup ("");
   previous_saved_command_line = xstrdup ("");
diff --git a/gdb/top.h b/gdb/top.h
index 9438e52331b..56bd06c698b 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -271,7 +271,7 @@  extern void set_prompt (const char *s);
 extern int gdb_in_secondary_prompt_p (struct ui *ui);
 
 /* Perform _initialize initialization.  */
-extern void gdb_init (char *);
+extern void gdb_init ();
 
 /* For use by event-top.c.  */
 /* Variables from top.c.  */