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 v3] Allow using special files with File I/O functions


Le 29/06/2018 à 16:28, Pedro Alves a écrit :
> Hi,
>
> Your message came our hard to read:
>
>  https://sourceware.org/ml/gdb-patches/2018-06/msg00715.html
>
> Please make sure your client is set up to quote replies.
>
> On 06/29/2018 03:01 PM, Julio Guerra wrote:
>
>> I assumed a system >= POSIX.1-2001 here. man 7 inode says:
>>
>>  
>>
>> The S_IF* constants are present in POSIX.1-2001 and later.
>>  […]
>>  The S_ISLNK() and S_ISSOCK() macros were not in POSIX.1-1996, but
>>  both are present in POSIX.1-2001
>>
>>
> POSIX specification != actual implementations.  Also, Windows != POSIX,
> for example.  See the gnulib page I pointed at.  Also, looking through
> history with "git blame", etc. may find something.

Isn't GDB compiled with mingw? I am no expert in mingw, but I thought it
was a POSIX implementation based on Windows.
Anyway, we can add usual #ifdef guards arounds the cases.
>
>> Yes, because of man 2 open:
>>
>>  
>>
>> EISDIR: The named file is a directory and oflag includes O_WRONLY or O_RDWR,
>>  or includes O_CREAT without O_DIRECTORY.
> I assume you're on Linux, so "man 2" is the Linux Programmer's manual.
> But GDB works in other hosts too.  So it may be the code was there for
> some other host.  I mean, why did someone write that in the first place?
> Again, sounds like some code archaeology is in order.

Yes, but I checked it was POSIX too:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html
>
> I forgot to say in the previous email, but it would be really nice if we
> could add some coverage for these change to the testsuite.  I've asked
> before but I don't remember the answer -- Would it be possible to portably
> update e.g. gdb.base/fileio.exp to cover at least one kind
> of FILEIO_STDEV_SPECIAL file?

Ok, I'll have a look, but I thought there File IOs were not implemented
in gdbserver, so what runs this test? If it is natively run, it won't
cover remote_fileio_func_*.

-- 
Julio Guerra
Co-founder & CTO of Farjump
Mobile: +33 618 644 164
LinkedIn: https://linkedin.com/in/guerrajulio
Slack: farjump.slack.com



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