gdb: refactor the initialization file lookup code
authorAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 14 Jan 2021 14:32:35 +0000 (14:32 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Thu, 15 Apr 2021 09:34:09 +0000 (10:34 +0100)
commit54b4dcc530f0a907d9121aba1a2631d7e3333a8f
treecaf6d74b42656cf49f6e036271f381b3dda790ba
parent985e026451640c880e13827454aa31b7a636d1bc
gdb: refactor the initialization file lookup code

In preparation for the next patch, which adds startup files, this
commit refactors the code for looking up the initialization files so
that the code can be more easily reused in the next commit.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* main.c (relocate_gdbinit_path_maybe_in_datadir): Rename to...
(relocate_file_path_maybe_in_datadir): ...this.
(class gdb_initfile_finder): New class.
(get_init_files): Now uses gdb_initfile_finder.
(print_gdb_help): Print 'None found' when there are no init files.
gdb/ChangeLog
gdb/main.c
This page took 0.036056 seconds and 4 git commands to generate.