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



_______________________________________________
bug-gdb mailing list
bug-gdb@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gdb

Reply via email to