gdb: refactor objfile::find_and_add_separate_symbol_file
authorAndrew Burgess <aburgess@redhat.com>
Fri, 13 Oct 2023 15:17:20 +0000 (16:17 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 14 Nov 2023 11:32:02 +0000 (11:32 +0000)
commit6234ba17598dba057a5a58f159a50f48740786b7
treed9517ebcfb55cf9d20db4dda598838aae0704491
parent27807da584977d7d92822473b35ce94a7d81b21c
gdb: refactor objfile::find_and_add_separate_symbol_file

This is purely a refactoring commit.

This commit splits objfile::find_and_add_separate_symbol_file into
some separate helper functions.  My hope is that the steps for looking
up separate debug information are now clearer.

In a later commit I'm going to extend
objfile::find_and_add_separate_symbol_file, with some additional
logic, so starting with a simpler function will make the following
changes easier.

When reading objfile::find_and_add_separate_symbol_file after this
commit, you might be tempted to think that removing the `has_dwarf`
local variable would be a good additional cleanup.  After the next
commit though it makes more sense to retain this local, so I've left
this in place for now.

There should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/symfile-debug.c