Search code examples
stackcoredumpraise

why raise(3) core dump file no stack frame symble


ENV: linux kernel 3.4, uclibc 0.9.33

Description: I use raise(3) and kill(3) send SIGSEGV to process and create a core dump file.I found 2 file bt is difference.

raise(3):

void fun2(void)
{
    raise(SIGSEGV);
}

void fun1(void)
{
    fun2();
}

int main(void)
{
    fun1();
    return 0;
}

core dump file stack frame:

(gdb) bt
#0  0xc6f7f2d4 in ?? ()
#1  0xc6f7f2a0 in ?? ()
#2  0xc6f7f2a0 in ?? ()

kill(3):

void fun2(void)
{
    kill(getpid(), SIGSEGV);
}

void fun1(void)
{
    fun2();
}

int main(void)
{
    fun1();
    return 0;
}

core dump file stack frame:

(gdb) bt
#0  0xc6f043f0 in ?? ()
#1  0x0000852c in fun2 () at test.c:20
#2  0x0000853c in fun1 () at test.c:25
#3  0x0000854c in main () at test.c:30

question:

  1. why raise(3) frame addr so big, what dose the number mean?

  2. why raise(3) have not symble in stack frame ?


Solution

  • I set sysroot when load core dump file ,then raise and kill bt become same.