From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1226428426683773829==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] libdwfl: Record dwfl_attach_state error and return it on failure. Date: Thu, 12 Jun 2014 14:46:07 +0200 Message-ID: <1402577167.3940.107.camel@bordewijk.wildebeest.org> In-Reply-To: 20140611202638.GA22213@host2.jankratochvil.net --===============1226428426683773829== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, 2014-06-11 at 22:26 +0200, Jan Kratochvil wrote: > On Wed, 11 Jun 2014 15:33:28 +0200, Mark Wielaard wrote: > > When dwfl_attach_state fails functions that need the process state shou= ld > > return the error that caused the attach to fail. Use this in the backtr= ace > > test to signal any attach failure. This makes sure that architectures t= hat > > don't provide unwinder support get properly detected (and the tests SKI= Ps) > > Also don't assert when trying to attach a non-core ELF file, but return= an > > error to indicate failure. > = > This patch reimplements former 'process_attach_error' under the new name > 'attacherr'. It is also related to the current requirement to call > dwfl_linux_proc_attach() explicitly by the clients since: > commit 19108019192ab273c53ae324be448d29dac806ca > Author: Mark Wielaard > Date: Mon Dec 30 22:00:57 2013 +0100 > libdwfl: Add dwfl_core_file_attach and dwfl_linux_proc_attach. > So I rather do not agree with the former patch which this one fixes. Good detective work. Indeed that commit from last year introduced the issue because it made the attaching explicit because the implicit attaching wasn't working out for some programs. So the implicit error reporting wasn't necessary anymore and got removed. https://lists.fedorahosted.org/pipermail/elfutils-devel/2013-December/00368= 0.html Except we forgot to account for the implicit attaching done through the argp option parser. So this patch adds it back. Thanks for the review. I'll commit it soon. Cheers, Mark --===============1226428426683773829==--