libunwind-devel
[Top][All Lists]
Advanced

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

Re: [libunwind] UNW_FLAG_INTERRUPT_FRAME


From: Troy Heber
Subject: Re: [libunwind] UNW_FLAG_INTERRUPT_FRAME
Date: Wed, 25 Aug 2004 10:52:03 -0600
User-agent: Mutt/1.5.6+20040803i

On 08/25/04, David Mosberger wrote:
> 
> unw_is_signal_frame() will return TRUE for this case.
> See the description in the man-page for details.

I tried that, but unw_is_signal_frame seems to change something in the cursor
state.  

Simplified example:

do{
        unw_get_reg(&cursor, UNW_REG_IP, &ip);
        unw_get_reg(&cursor, UNW_IA64_BSP, &bsp);
        unw_get_proc_name(&cursor, buf, 99, &off);
        printf ("%s#%d [BSP:%lx] at %lx\n", frame, (long) bsp, buf, (long) ip);
        frame++;
 } while (unw_step(&cursor) > 0);
    

Works and gives me:

 #0 [BSP:e000000100be9050] schedule at a000000100531fe0
 #1 [BSP:e000000100be9018] schedule_timeout at a0000001005333c0
 #2 [BSP:e000000100be8f90] sys_nanosleep at a0000001000a9510
 #3 [BSP:e000000100be8f90] ia64_ret_from_syscall at a000000100012000

*****************************************************************************
However if I change it to:

do{
        unw_get_reg(&cursor, UNW_REG_IP, &ip);
        unw_get_reg(&cursor, UNW_IA64_BSP, &bsp);
        unw_get_proc_name(&cursor, buf, 99, &off);
        printf ("%s#%d [BSP:%lx] at %lx\n", frame, (long) bsp, buf, (long) ip);
        frame++;

        if((ret = unw_is_signal_frame(&cursor)) > 0)
            printf("THIS IS A SIGNAL FRAME!!\n");

 } while (unw_step(&cursor) > 0);

I get:

 #0 [BSP:e000000100be9050] schedule at a000000100531fe0
 #1 [BSP:e000000100be9018] schedule_timeout at a0000001005333c0
 #2 [BSP:e000000100be8f90] sys_nanosleep at a0000001000a9510
 #3 [BSP:e000000100be8f90] ia64_ret_from_syscall at a000000100012000
 #4 [BSP:e000000100be8f90] unknown at a000000100012000
bt: invalid kernel virtual address: 0  type: "unw.tables"
bt: invalid kernel virtual address: 0  type: "unw.tables"
update_frame_state: ip, sp, and bsp unchanged; stopping here
(ip=0x7fffffff00000000)

Thanks, 

Troy


reply via email to

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