AFAIK, libunwind exists on several platforms... on
hpux for PA-RISC processors for instance. Are there
specific known issues which restrict it's usage with
mpatrol ?
- banibrata
--- Graeme Roy <graeme_roy@...> wrote:
> Hi Daniel,
>
>
>
> Thanks for sharing the patch. I wasn't aware of the
> libunwind project
> before now and it certainly looks like something
> that mpatrol could make use
> of in the future for other processors. Especially
> if it does things
> properly with regards to compiler optimisations and
> also working robustly on
> RISC processors. I'm sure a lot of mpatrol users on
> ARM and MIPS will
> benefit from this, and even more if libunwind makes
> it to other less
> mainstream processors.
>
>
>
> Thanks again,
>
>
>
> Graeme.
>
>
>
> _____
>
> From: mpatrol@yahoogroups.com
> [mailto:mpatrol@yahoogroups.com] On Behalf Of
> Daniel Jacobowitz
> Sent: 16 May 2008 14:56
> To: mpatrol@yahoogroups.com
> Subject: [mpatrol] mpatrol port using libunwind
>
>
>
> Hi all,
>
> On behalf of MontaVista, CodeSourcery recently added
> support to
> mpatrol to use libunwind (http://www.nongnu.
> <http://www.nongnu.org/libunwind/> org/libunwind/)
> in order
> to provide backtraces for ARM and MIPS. We also
> ported libunwind to
> ARM and MIPS targets, and added support to libunwind
> to read DWARF-2
> ..debug_frame in addition to the already supported
> .eh_frame. Those
> libunwind changes are in the tip of the libunwind
> development
> repository now.
>
> Here's the patch which adds libunwind support to
> mpatrol. In addition
> to support for libunwind this patch:
>
> - Improves Linux shared library support on current
> systems, by using
> dl_iterate_phdr instead of _DYNAMIC - the old
> mechanism was not
> working on any of our test platforms.
>
> - Fixes a problem we discovered when building
> mpatrol with -O0;
> initsection's initializer is __mp_initsection, which
> is not always
> defined.
>
> - Teaches mpatrol about the ".gnu_debuglink" section
> supported by
> current binutils (objcopy --only-keep-debug).
>
> In order to use this patch, you will need to build
> and install
> libunwind before mpatrol. Use of libunwind is
> controlled by
> MP_LIBUNWIND_SUPPORT in config.h; we added support
> for ARM,
> and enabled MP_LIBUNWIND_SUPPORT on ARM and MIPS by
> default.
>
> Applications using mpatrol will need to link with or
> LD_PRELOAD
> libunwind.so in addition to any current libraries
> like libbfd.so. The
> mpatrol wrapper has been updated to do this
> automatically.
>
> Hope this is useful! Feel free to include it in
> future releases.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
>
>
>