Re: [PATCH] Support gzip compressed exec and core files in gdb

Jan Kratochvil
2015-03-12T17:48:05Z

On Thu, 12 Mar 2015 18:37:45 +0100, Michael Eager wrote:
> On 03/12/15 10:11, Jan Kratochvil wrote:
> > One can readlink(/proc/self/fd/%d) although I haven't checked now how exactly
> > to use it.
>
> This won't tell what flags were used to open the file,
> so that the same flags can be used on the decompressed file.

If you mean the O_RDONLY etc. flags then read(/proc/self/fdinfo/%d):
pos: 0
flags: 0102002
mnt_id: 20

Jan