[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] libunwind ARM port

From: Anderson Lizardo
Subject: Re: [Libunwind-devel] libunwind ARM port
Date: Thu, 3 Jan 2008 09:42:36 -0400

On Jan 2, 2008 1:09 PM, Daniel Jacobowitz <address@hidden> wrote:
> On Wed, Jan 02, 2008 at 12:13:27PM -0400, Anderson Lizardo wrote:
> > Good to know! I'm particularly interested in getting simple backtraces
> > (just the addresses from each called function should suffice) from
> > running applications using libunwind's ptrace support. Do you know
> > whether is this possible with .debug_frame information generated by
> > latest CodeSourcery ARM toolchains?
> We have only tested local operation (within the same process).  Adding
> ptrace support for ARM would be a little work, but not much.  In fact,
> it might already work.  You'll need .debug_frame on the target system,
> so applications can not be completely stripped.

I tested your patch on ARM for both local and remote unwinding. It
worked fine for local, but not for remote. After some investigation, I
noticed that remote unwiding using dwarf_step() does not work for x86
either (at least on libunwind 0.98.5), but in case of x86 it falls
back to frame-chain unwinding. ARM, on the other hand, simply returns
0 when dwarf_step() fails.

Is that behaviour expected for libuwind or is that a bug? I'll test
latest git version on x86 to check the behaviour.

BTW, I think a little code snippet was missing on your patch, so I
could link to libunwind-ptrace properly:

Index: libunwind-0.98.5/src/ptrace/_UPT_find_proc_info.c
--- libunwind-0.98.5.orig/src/ptrace/_UPT_find_proc_info.c      2004-11-03
17:08:07.000000000 -0400
+++ libunwind-0.98.5/src/ptrace/_UPT_find_proc_info.c   2008-01-02
15:04:49.000000000 -0400
@@ -155,6 +155,16 @@ _UPTi_find_unwind_table (struct UPT_info
   return NULL;

+HIDDEN unw_dyn_info_t *
+_UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
+                        char *path, unw_word_t segbase, unw_word_t mapoff)
+  /* fix me */
+  return NULL;
 #elif UNW_TARGET_X86_64

 HIDDEN unw_dyn_info_t *

Anderson Lizardo
OpenBossa Labs - Instituto Nokia de Tecnologia
Manaus - Brazil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]