Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The call stack can't include the right symbol for a weak symbol in dynamic library

0 views
Skip to first unread message

xiaofeng.yan

unread,
Oct 29, 2014, 9:52:44 AM10/29/14
to bug...@gnu.org

Hi all,

I debug program with gdb on arm platform. The environment is as follow:

platform: vexpress(virtual machine for arm on qemu)
libc: uclibc
 
A error information happen when debug the next codes.
0xb6fa0440 in ?? () from /lib/libc.so.0

The call stack can't include the right symbol of function pause(); I found that the function pause() is a weak symbol in dynamic library libc.
I don't know the reason  why gdb can't get the right symbol from the call stack?  Is this error from gdb or uclibc.
Is there any suggestion about this error?  I will be very grateful for your any reply.



code:
 relativedebug.c :
 #include <unistd.h>
#include <stdlib.h>
#include <signal.h>


static void handler (int signo)
{
    abort ();
}

int main (void)
{
    signal (SIGALRM, handler);
    alarm (1);
    pause ();
    pause ();
    return 0;
}

-bash-4.2# '/usr/bin/'gdb relativedebug
delete breakpoints
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-euler-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/for_gdb_test/base_test/relativedebug...done.
(gdb) delete breakpoints
(gdb) break main
Breakpoint 1 at 0x8548: file relativedebug.c, line 30.
(gdb) run
Starting program: /tmp/for_gdb_test/base_test/relativedebug

Breakpoint 1, main () at relativedebug.c:30
30      signal (SIGALRM, handler);
(gdb) continue
Continuing.

Program received signal SIGABRT, Aborted.
0xb6fdb7f0 in raise () from /lib/libc.so.0
(gdb) bt
#0  0xb6fdb7f0 in raise () from /lib/libc.so.0
#1  0xb6fd5bf4 in abort () from /lib/libc.so.0^M
#2  0x00008540 in handler (signo=14) at relativedebug.c:25^M
#3  <signal handler called>^M
#4  0xb6fa0440 in ?? () from /lib/libc.so.0
#5  0x00008564 in main () at relativedebug.c:32
(gdb)

Thanks
Yan



0 new messages