Re: [PATCHv2 5/8] gdb: don't resume vfork parent while child is still running

Tom de Vries via Gdb-patches
2023-08-17T08:07:46Z

On 8/17/23 09:01, Tom de Vries via Gdb-patches wrote:
> On 8/17/23 08:36, Tom de Vries wrote:
>> On 8/16/23 16:02, Andrew Burgess via Gdb-patches wrote:
>>> +set remote_exec_prog [gdb_remote_download target $binfile3]
>>
>> With testing on target board unix I ran into:
>> ...
>> ERROR: tcl error sourcing
>> /data/vries/gdb/src/gdb/testsuite/gdb.base/vfork-follow-parent.exp.
>> ERROR: error copying "vforked-prog": no such file or directory
>>      while executing
>> "file copy -force $fromfile $tofile"
>>      (procedure "gdb_remote_download" line 29)
>>      invoked from within
>> "gdb_remote_download target $binfile3"
>> ...
>>
>> I managed to reproduce it, also with the mentioned target boards
>> native-gdbserver and native-extended-gdbserver.
>>
>> Did you mean something like:
>> ...
>> if {[is_remote host]} {
>>      remote_upload target $binfile3
>> }
>> ...
>> ?
>>
>
> Oops, of course that should be:
> ...
>  if {[is_remote target]} {
>       remote_upload target $binfile3
> }
> ...
>

I've got a patch that works, I'll commit shortly.

FWIW, I got my uploads and download confused, I forgot dejagnu inverts
the meaning of the concepts.

Thanks,
- Tom

> Thanks,
> - Tom
>
>> With that instead, I still see these FAILs with gdbserver boards:
>> ...
>> FAIL: gdb.base/vfork-follow-parent.exp:
>> exec_file=vfork-follow-parent-exec: target-non-stop=off: non-stop=off:
>> resolution_method=schedule-multiple: continue to end of inferior 2
>> FAIL: gdb.base/vfork-follow-parent.exp:
>> exec_file=vfork-follow-parent-exec: target-non-stop=off: non-stop=off:
>> resolution_method=schedule-multiple: continue to break_parent
>> ...
>> but not 100% reproducible.
>>
>> Thanks,
>> - Tom
>