From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12626 invoked by alias); 16 Sep 2011 13:55:27 -0000 Received: (qmail 12612 invoked by uid 22791); 16 Sep 2011 13:55:25 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Sep 2011 13:55:11 +0000 Received: from nat-jpt.mentorg.com ([192.94.33.2] helo=PR1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R4Ysn-0001R7-St from Yao_Qi@mentor.com ; Fri, 16 Sep 2011 06:55:10 -0700 Received: from [172.30.8.113] ([172.30.8.113]) by PR1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Sep 2011 22:55:08 +0900 Message-ID: <4E735536.1000405@codesourcery.com> Date: Fri, 16 Sep 2011 13:55:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Liang Cheng CC: gdb@sourceware.org Subject: Re: GDB 7.2 gets SIGSEGV when step into a function in a shared library References: <4E72241F.5060402@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00057.txt.bz2 On 09/16/2011 12:39 AM, Liang Cheng wrote: > Sorry for not being clear. > Here is the debug session getting SIGSEGV. xa_fun_in_lib is the > function defined in shared library, and its symbols has been found by > gdb. Step instruction also caused the same issue. The reason that I > attach those disassemble dump is to avoid rounds of ask-give. Let me > know if disassemble of the piece of code is needed. Any idea of why > it happens? > This debug session is much clear than last one. Thanks. > Breakpoint 1, main (argc=1, argv=0xbef25ca4) at vendor/altestavplayback.c:284 > 284 CheckErr(res); > 3: x/i $pc > => 0x8d12 : ldr r0, [r7, #52] ; 0x34 > (gdb) n > 286 z = xa_fun_in_lib(10); > 3: x/i $pc > => 0x8d18 : mov.w r0, #10 > (gdb) s > Before you run `step', turn on some debug output first. Like this `set debug infrun 1'. Then, when you run `step', you can see some debug output, which will show how PC is changed and events inferior gets during command `step'. However, before we go into the details of debug output, could you check whether GDB cvs trunk works or not. You just have to build gdb for arm, and I think GDB cvs trunk should be able to work with your 7.2 gdbserver. > Program received signal SIGSEGV, Segmentation fault. > 0x00008d22 in main (argc=1, argv=0xbef25ca4) at vendor/altestavplayback.c:286 > 286 z = xa_fun_in_lib(10); > 3: x/i $pc > => 0x8d22 : str r3, [r7, #44] ; 0x2c > (gdb) info address xa_fun_in_lib > Symbol "xa_fun_in_lib(int)" is a function at address 0x800036fc. > > On Thu, Sep 15, 2011 at 11:13 AM, Yao Qi wrote: >> On 09/15/2011 12:21 AM, Liang Cheng wrote: -- Yao (齐尧)