This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Improve syscall entry/return tracking on Linux


On 10/09/2015 11:09 AM, Pedro Alves wrote:
> On 10/09/2015 06:57 PM, Josh Stone wrote:
>> On 10/09/2015 03:48 AM, Pedro Alves wrote:
> 
>>> no-mmu / uclinux systems don't have fork.  I'm not sure whether
>>> fork returns ENOSYS or SYS_fork isn't even defined there.
>>> Maybe just switch to vfork so we can keep catch syscall
>>> coverage on those systems?
>>
>> In kernel/fork.c I see that lacking CONFIG_MMU returns EINVAL.
>>
>> But it appears a few archs don't implement fork/vfork syscalls at all,
>> only clone.  
> 
> Ah, yeah.  Even on x86 glibc doesn't really implement fork
> with the fork syscall.
> 
>> Maybe I should use CLONE_VFORK for broadest coverage?
> 
> That does sound the best.

I tried, but this area is fraught with idiosyncrasies.  I'm going with a
direct vfork() call and loose pattern matching for what syscall results,
since I don't actually care about that detail for this test.  Hope that
works for you.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]