Factor out the code to do the datadir-relocation for gdbinit
authorChristian Biesinger <cbiesinger@google.com>
Tue, 20 Aug 2019 21:38:29 +0000 (16:38 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Wed, 11 Sep 2019 21:30:00 +0000 (16:30 -0500)
commit9224a01377868604ce4a7eb9c0d97736f7349dcd
tree92a4d226ec7ca7f8cf8c5261b5bc5c9f81495940
parentf48cd8368bf45b40547237939af3ab6b47dc7b01
Factor out the code to do the datadir-relocation for gdbinit

This simplifies get_init_files and makes it possible to reuse
this code in an upcoming patch for SYSTEM_GDBINIT_DIR.

gdb/ChangeLog:

2019-09-11  Christian Biesinger  <cbiesinger@google.com>

* main.c (relocate_gdbinit_path_maybe_in_datadir): Factor this code
out of get_init_files.
(get_init_files): Update.
gdb/ChangeLog
gdb/main.c