This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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] libdwfl: Record dwfl_attach_state error and return it on failure.


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 should
> > return the error that caused the attach to fail. Use this in the backtrace
> > test to signal any attach failure. This makes sure that architectures that
> > don't provide unwinder support get properly detected (and the tests SKIPs)
> > 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 <mjw@redhat.com>
> 	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/003680.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


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