From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63919 invoked by alias); 27 Jun 2015 01:35:30 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 63910 invoked by uid 89); 27 Jun 2015 01:35:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f42.google.com Received: from mail-la0-f42.google.com (HELO mail-la0-f42.google.com) (209.85.215.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 27 Jun 2015 01:35:27 +0000 Received: by lagx9 with SMTP id x9so73578219lag.1 for ; Fri, 26 Jun 2015 18:35:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.22.168 with SMTP id e8mr4129355laf.40.1435368923795; Fri, 26 Jun 2015 18:35:23 -0700 (PDT) Received: by 10.25.11.3 with HTTP; Fri, 26 Jun 2015 18:35:23 -0700 (PDT) Date: Sat, 27 Jun 2015 01:35:00 -0000 Message-ID: Subject: [ARM][GDB] backtrace does not go beyond libc functions From: Sundar Dev To: gdb@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00090.txt.bz2 Hi List Members: First things first- I am using gdbserver 7.6.2 for remote debugging. The other main components are- GNU libc-2.19 that comes packaged in Yocto Poky 'Daisy' release for one of my projects. This is cross-compiled for ARMv7 and we use arm-poky-linux-gnueabi-gcc (GCC) 4.8.2 toolchain. I use the *non-debug* version of glibc (with no .debug sections in elf), but built with ARM unwind tables and ARM frame pointer support. With this setup, when a user space thread is executing a blocking libc function like poll(), read(), etc., and I attach a remote gdbserver to the process and try to get backtrace, all I see is the following 4 backtrace frames as shown below- (gdb) bt #0 0x758b9190 in poll () from /lib/libc.so.6 #1 0x758b9184 in poll () from /lib/libc.so.6 #2 0x013df120 in ?? () #3 0x013df120 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) And address 0x013df120 is in the heap region in proc//maps (shown below) of my process- root@xyz# cat /proc/621/maps ...... 01389000-0154e000 rw-p 00000000 00:00 0 [heap] ...... I've looked at gdb source code and I know that the version of gdb that I'm using (7.6.2) has support to backtrace using ARM unwind tables and frame pointers (see [1] and [2]). But, even then, all I get from GDB backtrace is the above shown output. Does anybody here have any comments and/or suggestions? Thanks, Sundar Dev [1] https://sourceware.org/ml/gdb-cvs/2011-02/msg00011.html [2] https://sourceware.org/ml/gdb-cvs/2011-02/msg00012.html