bug-gdb
[Top][All Lists]
Advanced

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

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


From: xiaofeng.yan
Subject: The call stack can't include the right symbol for a weak symbol in dynamic library
Date: Wed, 29 Oct 2014 19:45:05 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8


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




reply via email to

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