public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Fwd: The call stack can't include the right symbol for a weak symbol in dynamic library
       [not found] <5450D5CC.4050209@huawei.com>
@ 2014-10-29 11:58 ` Liu hua
  0 siblings, 0 replies; only message in thread
From: Liu hua @ 2014-10-29 11:58 UTC (permalink / raw)
  To: gdb; +Cc: xiaofeng.yan, peifeiyue, Liu Hua

form: xiaofeng.yan@huawei.com
Hi all,

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

platform: vexpress(virtual <app:ds:virtual> machine <app:ds: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> <http://gnu.org/licenses/gpl.html%3E%5EM>
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/>... <http://www.gnu.org/software/gdb/bugs/%3E...%5EM>
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








^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-29 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5450D5CC.4050209@huawei.com>
2014-10-29 11:58 ` Fwd: The call stack can't include the right symbol for a weak symbol in dynamic library Liu hua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).