public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: frysk@sourceware.org
Subject: Re: [patch] Add debug_frame parsing
Date: Thu, 17 Jan 2008 14:34:00 -0000	[thread overview]
Message-ID: <478F66E0.1090900@redhat.com> (raw)
In-Reply-To: <1200568336.2470.18.camel@dijkstra.wildebeest.org>

Mark Wielaard wrote:
> Hi,
>
> This patch widens out libunwind interface to accept either eh_frame or
> debug_frame tables and adds support for parsing debug_frame data. It
> currently does a linear search through the data to find the right fde
> and corresponding cie by making the right adjustments. Although it does
> find the right fde covering the ip ranges, it doesn't always run the cfi
> program correctly. So for now the default is still the default and
> debug_frame is only used as fallback when eh_frame data cannot be found
> (that can be changed in a simple if statement, see the FIXME in UnwindH
> - that will however give a couple of test failures). It also fixes a
> couple of libunwind issues found when working on this (direct usage of
> local memory space, error values not being negative and unw_word being
> 64bit != dwarf 64 format is always in use).
>
>   
Nice work mark; this gets us to a much more reliable unwinder!

Andrew

> frysk-imports/libunwind/ChangeLog
> 2008-01-17  Mark Wielaard  <mwielaard@redhat.com>
>
>     * include/dwarf.h (dwarf_extract_proc_info_from_fde): Pass
>     table_start.
>     * src/dwarf/Gfde.c (is_cie_id): Removed.
>     (parse_cie): Accept debug and eh cie ids.
>     (dwarf_extract_proc_info_from_fde): Accept table_start. Calculate
>     correct cie_addr. Fix error reporting.
>     * src/dwarf/Gfind_proc_info-lsb.c (linear_search): Don't depend
>     on local address space. Pass table start for fde parsing.
>     (dwarf_search_unwind_table): Handle debug_frame by linear search.
>     * src/mi/Gget_unwind_table.c (get_frame_table, get_debug_table):
>     new functions.
>     (unw_get_unwind_table): Call either get_frame_table or
>     get_debug_table depending on format.
>
> frysk-sys/lib/unwind/ChangeLog
> 2008-01-17  Mark Wielaard  <mwielaard@redhat.com>
>
>     * cni/UnwindH.hxx (get_eh_frame_hdr_addr): Find and return
>     debug_frame address and set pi->format.
>     (createProcInfoFromElfImage): Handle either debug_frame or
>     eh_frame addresses.
>
> Tested on x86_64 and x86 (fedora and centos, which both have full
> eh_frame coverage, so admittedly most of the new code paths aren't hit
> yet).
>
> Cheers,
>
> Mark
>   

  reply	other threads:[~2008-01-17 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-17 11:12 Mark Wielaard
2008-01-17 14:34 ` Andrew Cagney [this message]
2008-01-20 15:08 ` 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=478F66E0.1090900@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=mark@klomp.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).