From: Cliff Wickman <cpw@sgi.com>
To: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
Cc: d.hatayama@jp.fujitsu.com, kexec@lists.infradead.org
Subject: Re: [PATCH] makedumpfile: warn on vmlinux without dwarf
Date: Mon, 20 May 2013 07:17:12 -0500 [thread overview]
Message-ID: <20130520121712.GA25963@sgi.com> (raw)
In-Reply-To: <20130520112044.0c660d8586141b938800d0d6@mxc.nes.nec.co.jp>
On Mon, May 20, 2013 at 11:20:44AM +0900, Atsushi Kumagai wrote:
> On Wed, 15 May 2013 13:43:59 -0500
> Cliff Wickman <cpw@sgi.com> wrote:
>
> > From: Cliff Wickman <cpw@sgi.com>
> >
> > If the vmlinux does not have dwarf information makedumpfile fails in
> > a rather obscure way, with a flood of redundant errors,
> >
> > Make it fail with more of a hint of what is wrong.
> >
> > Signed-off-by: Cliff Wickman <cpw@sgi.com>
> > ---
> > dwarf_info.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > Index: makedumpfile.mmap/dwarf_info.c
> > ===================================================================
> > --- makedumpfile.mmap.orig/dwarf_info.c
> > +++ makedumpfile.mmap/dwarf_info.c
> > @@ -139,6 +139,10 @@ process_module (Dwfl_Module *dwflmod,
> >
> > /* get a debug context descriptor.*/
> > dwarf_info.dwarfd = dwfl_module_getdwarf (dwflmod, &dwbias);
> > + if (dwarf_info.dwarfd == NULL) {
> > + fprintf(stderr, "makedumpfile: dwfl_module_getdwarf error\n");
> > + exit(1);
> > + }
>
> I agree to insert this message here, but don't agree to abort without
> any error handling.
> I think the code below seems better:
>
> if (dwarf_info.dwarfd == NULL) {
> ERRMSG("dwfl_module_getdwarf error.\n");
> return DWARF_CB_ABORT;
> }
Agreed. An error code is good.
-Cliff
>
>
> Thanks
> Atsushi Kumagai
>
> > dwarf_info.elfd = dwarf_getelf(dwarf_info.dwarfd);
> >
> > mod_name = dwfl_module_info(dwflmod, NULL, NULL, NULL, NULL, NULL,
> >
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
--
Cliff Wickman
SGI
cpw@sgi.com
(651) 683-3824
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
prev parent reply other threads:[~2013-05-20 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 18:43 [PATCH] makedumpfile: warn on vmlinux without dwarf Cliff Wickman
2013-05-20 2:20 ` Atsushi Kumagai
2013-05-20 12:17 ` Cliff Wickman [this message]
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=20130520121712.GA25963@sgi.com \
--to=cpw@sgi.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
/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