This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 1/2] Check results of get_darwin_inferior
- From: Tom Tromey <tom at tromey dot com>
- To: Xavier Roirand <roirand at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 02 Aug 2018 13:30:45 -0600
- Subject: Re: [RFA 1/2] Check results of get_darwin_inferior
- References: <20180713204456.23626-1-tom@tromey.com> <20180713204456.23626-2-tom@tromey.com> <c20d6585-4e90-217f-6dc7-54869bcdcdfd@adacore.com>
>>>>> "Xavier" == Xavier Roirand <roirand@adacore.com> writes:
>> diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
>> index bb46cfbfcfa..6d7b80ddcb1 100644
>> --- a/gdb/darwin-nat.c
>> +++ b/gdb/darwin-nat.c
>> @@ -259,6 +259,9 @@ darwin_check_new_threads (struct inferior *inf)
>> darwin_inferior *darwin_inf = get_darwin_inferior (inf);
>> std::vector<darwin_thread_t *> new_thread_vec;
>> + if (darwin_inf == nullptr)
>> + return;
Xavier> Wouldn't return NULL be better here ?
In git, darwin_check_new_threads returns void.
Maybe it's different in your tree?
Tom