From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0802157190023155475==" MIME-Version: 1.0 From: Jan Kratochvil To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] Add --core-pattern option to eu-stack Date: Thu, 27 Nov 2014 22:41:30 +0100 Message-ID: <20141127214130.GA29584@host2.jankratochvil.net> In-Reply-To: 1417086351.4954.40.camel@bordewijk.wildebeest.org --===============0802157190023155475== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, 27 Nov 2014 12:05:51 +0100, Mark Wielaard wrote: > We have -o,--output support in other utilities. Those are ld, strip and unstrip. That is not for text output but for the resulting ELF files which is IMO a different case. BTW I am not against it, I just find it redundant. If thiAny program could have -o|--output but in UNIX it is solved by the more general shell '>'. > But maybe it isn't > useful in general and people will always use shell redirection? Currently it uses fopen "wx" which requires unique filename for each crash dump unwind. One could use %p in the filename but that is also not complet= ely unique. Besides that one should IMO provide more information from /proc/PI= D/ (like fd/ ) than just the backtrace eu-stack can provide. One is also interested in /proc/PID/exe which is not obvious from -l or -m (at least for PIEs); although one could possibly use %E for core_pattern. I just find it improbable one would not need a single other kind of information than what eu-stack can provide. > But if --core-pattern isn't useful without other code, then we should > include that code too. Yes, there could be provided some "contrib"-like core dumping shell script. > Could you post what you have? Nothing interesting, only for debugging eu-stack --core-pattern, when you a= sk: #! /bin/bash exec >>/tmp/out 2>>/tmp/out date --iso=3Dseconds echo "$*" cd /home/jkratoch/redhat/elfutils . /home/jkratoch/t/elfutils-boot ldd ./src/stack # It locks up as strace holds fd 0: #strace -s200 -o /tmp/out.strace -q ./src/stack --core-pattern -1 --pid=3D= $1 exec ./src/stack --core-pattern -1 -l -m --pid=3D$1 Jan --===============0802157190023155475==--