Re: [PATCH v7 3/4] Share fork_inferior et al with gdbserver

Sergio Durigan Junior
2017-06-21T17:19:11Z

On Wednesday, June 21 2017, Simon Marchi wrote:

> On 2017-06-05 00:18, Sergio Durigan Junior wrote:
>> This is the most important (and the biggest, sorry) patch of the
>> series. It moves fork_inferior from gdb/fork-child.c to
>> common/common-fork-child.c and makes all the necessary adjustments to
>> both GDB and gdbserver to make sure everything works OK.
>>
>> There is no "most important change" with this patch; all changes are
>> made in a progressive way, making sure that gdbserver had the
>> necessary features while not breaking GDB at the same time.
>>
>> I decided to go ahead and implement a partial support for starting the
>> inferior with a shell on gdbserver, although the full feature comes in
>> the next patch. The user won't have the option to disable the
>> startup-with-shell, and also won't be able to change which shell
>> gdbserver will use (other than setting the $SHELL environment
>> variable, that is).
>>
>> Everything is working as expected, and no regressions were present
>> during the tests.
>
> I just started to play with GDB on macOS, and it seems currently
> broken, a bisect pointed me to this commit
> (2090129c36c7e582943b7d300968d19b46160d84).
>
> When trying to run/start, I get this:
>
> Temporary breakpoint 1 at 0x100000fb6: file /Users/simark/test.c, line
> 2.
> Starting program: /Users/simark/test
> /Users/simark/src/binutils-gdb/gdb/darwin-nat.c:383: internal-error:
> void darwin_check_new_threads(struct inferior *): Assertion `tp'
> failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)
>
> I haven't investigated yet, but I thought I'd share the information in
> case somebody is interested .
>
> I am CCing Tristan because he's the last person who made fixes to keep
> the macOS support somewhat working (thanks!). If you could at least
> tell if you get the same error, it would be helpful.

I'll try to investigate as well, but for obvious reasons I don't have a
mac. I'll keep you posted.

Thanks,

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible