[review v4] Load system gdbinit files from a directory

Christian Biesinger (Code Review)
2019-10-23T14:56:10Z

Christian Biesinger has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26
......................................................................

Patch Set 4:

(4 comments)

Thanks for the review!

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c
File gdb/main.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c@265
PS3, Line 265: DIR *dir = nullptr;
> gdb_dir_up?
Ah thanks! Done.

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c@268
PS3, Line 268: if (dir != nullptr)
> Why not […]
Yes, I wanted to save an indentation level. Do you want me to change it?

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c@277
PS3, Line 277: if (ent->d_name[0] == '.')
> I know that's for skipping . and .. […]
Changed to only skip . and ..

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c@1039
PS3, Line 1039: ret = catch_command_errors (source_script, file.c_str (), 0);
> It's weird that ret is set but almost never checked throughout this function...
Yeah, I was wondering about too...