public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Claudiu Zissulescu-Ianculescu <claudiu.zissulescu-ianculescu@oracle.com>
Cc: toolchain-patches_ww_grp <toolchain-patches_ww_grp@oracle.com>,
	libc-alpha@sourceware.org
Subject: Re: SFrame stack tracer
Date: Thu, 24 Oct 2024 12:59:32 +0200	[thread overview]
Message-ID: <87sesl22cr.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <9bc1c439-b3f0-4833-9613-333eeffc629d@oracle.com> (Claudiu Zissulescu-Ianculescu's message of "Wed, 9 Oct 2024 20:09:33 +0300")

* Claudiu Zissulescu-Ianculescu:

> Looking to dwarf stack unwinding support in glibc, it looks to me like
> it is based on unwinder routines from libgcc.

Correct.  We have an old copy of the unwinder in the glibc sources, but
most architectures do not use it.

> Now, I would like to clarify if you would like to see the entire SFrame
> stack tracer implementation added to glibc source code, i.e., without
> any libgcc callbacks like in dwarf case.

I think this makes sense.  The SFrame data is generated by binutils from
DWARF, so if we'd call a library, I suppose it would have to be
something provided by binutils.  (Although technically, the DWARF data
that ends up in PT_GNU_EH_FRAME has been significantly rewritten by
binutils, too.)

Having the implementation in glibc proper also makes it easier to figure
out how to discover signal frames because glibc controls the SA_RESTORER
handshake on the userspace side.  An unwinder separate from glibc would
not have access to these internal glibc implementation details today.

> As far as I can see, a SFrame stack tracer implementation will need some
> architecture specific code added too, which may imply some extra
> interfaces to be created on top of the suggested one in dl_find_object
> structure.

Yes, that's not going to be enough, but I think some form is required
for getting SFrame data quickly.

Thanks,
Florian


      reply	other threads:[~2024-10-24 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 17:09 Claudiu Zissulescu-Ianculescu
2024-10-24 10:59 ` Florian Weimer [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=87sesl22cr.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=claudiu.zissulescu-ianculescu@oracle.com \
    --cc=libc-alpha@sourceware.org \
    --cc=toolchain-patches_ww_grp@oracle.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).