[3/3] Introduce a separate debug objfile iterator
Commit Message
>>>>> "John" == John Marshall <John.W.Marshall@glasgow.ac.uk> writes:
John> On 3 May 2019, Tom Tromey <tom@tromey.com> wrote:
>> commit bba6afebd7fde978acb6e06a48084a694aab3b7a
>> Author: Tom Tromey <tom@tromey.com>
>> Date: Fri May 3 17:21:36 2019 -0600
>>
>> Remove "struct" from foreach statements
>> [snip]
>> * darwin-nat.c (thread_info_from_private_thread_info): Remove
>> "struct" from foreach.
John> This broke compilation on macOS (tested on Mojave) with both Clang and GCC (9.1.0):
Can you try the appended? I no longer have a macOS machine to test on.
If this works for you, I will check it in.
This clashes with the normal gcc bug workaround that we do here; but I
think on macOS that probably isn't worth worrying about.
Tom
Comments
On 15 May 2019, at 16:45, Tom Tromey <tom@tromey.com> wrote:
> John> This broke compilation on macOS (tested on Mojave) with both Clang and GCC (9.1.0):
>
> Can you try the appended? I no longer have a macOS machine to test on.
Yes, that does the trick.
> This clashes with the normal gcc bug workaround that we do here; but I
> think on macOS that probably isn't worth worrying about.
Possibly a C-style for loop with explicit begin()/end() would work with both, but I'd agree that it's not worth worrying about for this Darwin-only file.
Thanks,
John
@@ -1706,7 +1706,7 @@ darwin_attach_pid (struct inferior *inf)
static struct thread_info *
thread_info_from_private_thread_info (darwin_thread_info *pti)
{
- for (thread_info *it : all_threads ())
+ for (struct thread_info *it : all_threads ())
{
darwin_thread_info *iter_pti = get_darwin_thread_info (it);