libunwind-devel
[Top][All Lists]
Advanced

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

[Libunwind-devel] Re: unwind-ptrace


From: Janne Karhunen
Subject: [Libunwind-devel] Re: unwind-ptrace
Date: Thu, 29 May 2008 11:13:39 -0400

Hi,

Sorry, just noticed that this was already fixed in git
version. It works fine.


-- 
// Janne

On Thu, May 29, 2008 at 9:01 AM, Janne Karhunen
<address@hidden> wrote:
> Hi,
>
> Quick question - is unw_step() supposed to work exactly
> the same with unwind ptrace and locally?
>
> This seems to be working fine when local, but when task
> is remote (create_addr_space and all) unw_step finds no
> frames. Yet unw_get_reg and everything are working, so
> basic ptrace geekiness should be OK:
>
>  as = unw_create_addr_space (&_UPT_accessors, 0);
>  ui = _UPT_create (target_tid);
>  ret = unw_init_remote (&c, as, ui);
>
>  while (unw_step(&c) > 0)
>  {
>    unw_get_reg(&c, UNW_REG_IP, &ip);
>    unw_get_reg(&c, UNW_REG_SP, &sp);
>
>    rc = dladdr ( (void*)ip, &info );
>    if (rc > 0)
>      printf ("0x%lx (%s), sp = 0x%lx\n", (long) ip, info.dli_sname, (long) 
> sp);
>    else
>      printf ("0x%lx, sp = 0x%lx\n", (long) ip, (long) sp);
>    ..
>
>
> --
> // Janne
>




reply via email to

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