From eda214cec17472e7383b8aaf17f6a065b0be4a1e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 12 Oct 2020 15:53:16 -0600 Subject: Remove clear_section_table The call to clear_section_table in ~program_space is now clearly not needed -- the section table will clear itself. This patch removes this call and then inlines the one remaining call to clear_section_table. gdb/ChangeLog 2020-10-12 Tom Tromey * progspace.c (program_space::~program_space): Don't call clear_section_table. * exec.h (clear_section_table): Don't declare. * exec.c (exec_target::close): Update. (clear_section_table): Remove. --- gdb/exec.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'gdb/exec.c') diff --git a/gdb/exec.c b/gdb/exec.c index 43385fe..ab47757 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -183,7 +183,7 @@ exec_target::close () for (struct program_space *ss : program_spaces) { set_current_program_space (ss); - clear_section_table (current_target_sections); + current_target_sections->sections.clear (); exec_close (); } } @@ -577,14 +577,6 @@ file_command (const char *arg, int from_tty) } -/* See exec.h. */ - -void -clear_section_table (struct target_section_table *table) -{ - table->sections.clear (); -} - /* Builds a section table, given args BFD, TABLE. */ target_section_table -- cgit v1.1