[review v3] Load system gdbinit files from a directory
Simon Marchi (Code Review)
gerrit@gnutoolchain-gerrit.osci.io
Wed Oct 23 03:53:00 GMT 2019
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26
......................................................................
Patch Set 3:
(4 comments)
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?
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/26/3/gdb/main.c@268
PS3, Line 268: if (dir != nullptr)
Why not
if (!relocated_gdbinit_dir.empty ()
{
DIR *dir = opendir (...);
if (dir != nullptr)
{
...
}
}
Is it to save an indentation level?
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 .., but that will skip all files starting with a dot ("hidden files"). I don't think it's documented that these will be skipped, is it?
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...
More information about the Gdb-patches
mailing list