public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Maurizio Papini <mpapini@redhat.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH 0/2] addr2line: new option -n to add a newline at the end
Date: Tue, 10 Jan 2023 16:28:37 +0100	[thread overview]
Message-ID: <CADCMg4MBHw-XGhp54WPT23vEGLHP6F5hfqArX9ct+uHFpC3CzQ@mail.gmail.com> (raw)
In-Reply-To: <3d553ffd-b848-12aa-44a8-a70a80664fcb@redhat.com>

Hi Nick and thanks for your time.

> I am sorry - I totally missed this patch submission. :-(

The patch is definitely not urgent, trivial stuff indeed, and my submission day
was so close to the end of 2022.

> I am not sure what you are getting at here.  Are you saying that addr2line
> can get stuck and so a timeout is needed in order to be to distinguish between
> addr2line being slow and addr2line being stuck ?  If so then this sounds
> like a more serious problem that needs to be addressed by something other
> than just adding a blank line to the output.

No, I didn't see this kind of problem. I'm talking about this use case:
addr2line as a process, with "-i" option, that is reading from stdin
working on a
big binary, say like the Linux kernel with debug info (~400M+), so that spawning
the process once is definitely better than doing it every time.

> I have to say that I am kind of with Jan on this one - it seems like
> a lot of effort to fix a small problem.  Isn't there an easier way
> that would not involve patching addr2line ?  For example if you use
> the -a/--addresses option then each decoded address will be prefixed
> with a line containing a simple hex number.  This would allow a consumer
> of addr2line's output to detect the start of each decoded address.

I'm thinking about using your suggestion (thanks): with -a the address is added
as a prefix as you said, while it would have been useful to have it at
the end :-),
but querying two times...

Maurizio

Maurizio


On Tue, Jan 10, 2023 at 1:19 PM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Maurizio,
>
> > Do you think this should go through an RFC? Do you have any thoughts?
>
> I am sorry - I totally missed this patch submission. :-(
>
> >> This series adds a new option to addr2line (-n) to append a newline
> >> after the last informative one.
>
> I have to say that I am kind of with Jan on this one - it seems like
> a lot of effort to fix a small problem.  Isn't there an easier way
> that would not involve patching addr2line ?  For example if you use
> the -a/--addresses option then each decoded address will be prefixed
> with a line containing a simple hex number.  This would allow a consumer
> of addr2line's output to detect the start of each decoded address.
>
>
> > the
> > additional empty line can be used to mark the end of the inlined functions
> > lists so that an application can get the output without defining a timeout.
>
> I am not sure what you are getting at here.  Are you saying that addr2line
> can get stuck and so a timeout is needed in order to be to distinguish between
> addr2line being slow and addr2line being stuck ?  If so then this sounds
> like a more serious problem that needs to be addressed by something other
> than just adding a blank line to the output.
>
> Cheers
>    Nick
>
>


      reply	other threads:[~2023-01-10 15:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 13:53 Maurizio Papini
2022-12-19 13:53 ` [PATCH 1/2] " Maurizio Papini
2022-12-19 13:53 ` [PATCH 2/2] addr2line: test to check -n option Maurizio Papini
2023-01-09 16:04 ` [PATCH 0/2] addr2line: new option -n to add a newline at the end Maurizio Papini
2023-01-09 16:17   ` Jan Beulich
2023-01-10 14:17     ` Maurizio Papini
2023-01-10 15:50       ` Jan Beulich
2023-01-10 12:19   ` Nick Clifton
2023-01-10 15:28     ` Maurizio Papini [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=CADCMg4MBHw-XGhp54WPT23vEGLHP6F5hfqArX9ct+uHFpC3CzQ@mail.gmail.com \
    --to=mpapini@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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).