This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 1/2] Create new common/pathstuff.[ch]
On Wednesday, February 28 2018, Simon Marchi wrote:
> On 2018-02-27 10:27 PM, Sergio Durigan Junior wrote:
>> diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
>> index cb02b58507..922d5269b3 100644
>> --- a/gdb/gdbserver/server.c
>> +++ b/gdb/gdbserver/server.c
>> @@ -56,6 +56,10 @@
>> break; \
>> }
>>
>> +/* String containing the current directory (what getwd would return). */
>> +
>> +char *current_directory;
>> +
>> /* The environment to pass to the inferior when creating it. */
>>
>> static gdb_environ our_environ;
>> @@ -3539,6 +3543,13 @@ captured_main (int argc, char *argv[])
>> const char *selftest_filter = NULL;
>> #endif
>>
>> + current_directory = getcwd (NULL, 0);
>> + if (current_directory == NULL)
>> + {
>> + error (_("%s: error finding working directory"),
>> + safe_strerror (errno));
>> + }
>
> Just one thing, I think Pedro suggested to put the variable string at the end:
>
> error (_("Could not find working directory: %s"),
> safe_strerror (errno));
Ah, that's right, sorry about this, I got confused. And I didn't get
this message on my INBOX, so I went ahead and pushed the commit without
this change. I took the liberty to push an obvious commit now fixing
this.
815615463b1171cbff7c5e54f62fc708cc1bbc99
Thanks,
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/