public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
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	[thread overview]
Message-ID: <1402577167.3940.107.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: 20140611202638.GA22213@host2.jankratochvil.net

[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]

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


             reply	other threads:[~2014-06-12 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 12:46 Mark Wielaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-11 20:26 Jan Kratochvil
2014-06-11 13:33 Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402577167.3940.107.camel@bordewijk.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).