This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Support gzip compressed exec and core files in gdb
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Eager <eager at eagerm dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, binutils <binutils at sourceware dot org>
- Date: Thu, 12 Mar 2015 18:47:57 +0100
- Subject: Re: [PATCH] Support gzip compressed exec and core files in gdb
- Authentication-results: sourceware.org; auth=none
- References: <54FF77D6 dot 7010400 at eagerm dot com> <20150311221329 dot GB11980 at host1 dot jankratochvil dot net> <5500E074 dot 6070002 at eagerm dot com> <55016D6F dot 4010104 at redhat dot com> <5501B1EB dot 5010806 at eagerm dot com> <5501BB08 dot 90503 at redhat dot com> <5501C59A dot 1070405 at eagerm dot com> <20150312171144 dot GA13600 at host1 dot jankratochvil dot net> <5501CEE9 dot 2060607 at eagerm dot com>
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