From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29068 invoked by alias); 15 Sep 2011 14:06:51 -0000 Received: (qmail 29055 invoked by uid 22791); 15 Sep 2011 14:06:48 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 14:06:33 +0000 X-Loopcount0: from 10.170.28.41 From: To: CC: Date: Thu, 15 Sep 2011 14:06:00 -0000 Subject: RE: Python: gdb.Type.template_argument method issue Message-ID: <09787EF419216C41A903FD14EE5506DD0307EF988D@AUSX7MCPC103.AMER.DELL.COM> References: <09787EF419216C41A903FD14EE5506DD0307EF93D7@AUSX7MCPC103.AMER.DELL.COM> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 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/msg00053.txt.bz2 Pj4gVGhlIHRlbXBsYXRlX2FyZ3VtZW50IG1ldGhvZCBhc3N1bWVzIHRoYXQg YWxsIHRlbXBsYXRlIGFyZ3VtZW50cyBhcmUgDQo+PiB0eXBlcy7CoCAuLi4N Cj4NCj5odHRwOi8vc291cmNld2FyZS5vcmcvYnVnemlsbGEvc2hvd19idWcu Y2dpP2lkPTExMDYwDQo+DQo+SWYgdGhhdCBpcyB0aGUgaXNzdWUgeW91IGFy ZSBlbmNvdW50ZXJpbmcsIGl0IGxvb2tzIGxpa2UgaXQgaGFzIGJlZW4gZml4 ZWQgaW4gR0RCLCBidXQgeW91IG5lZWQgYSBuZXdlciBHQ0MgdG8gdGFrZSBh ZHZhbnRhZ2Ugb2YgaXQuDQoNClllcywgdGhhdCdzIGl0LiAgVGhhbmtzLCBz byBhbGwgSSBoYXZlIHRvIGRvIGlzIHVwZGF0ZSB0byB0aGUgbGF0ZXN0Lg0K DQoJcGF1bA0K >From gdb-return-39784-listarch-gdb=sources.redhat.com@sourceware.org Thu Sep 15 16:13:46 2011 Return-Path: Delivered-To: listarch-gdb@sources.redhat.com Received: (qmail 29022 invoked by alias); 15 Sep 2011 16:13:42 -0000 Received: (qmail 29007 invoked by uid 22791); 15 Sep 2011 16:13:40 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_BL 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; Thu, 15 Sep 2011 16:13:26 +0000 Received: from nat-jpt.mentorg.com ([192.94.33.2] helo=PR1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R4EZ3-0002bt-Br from Yao_Qi@mentor.com for gdb@sourceware.org; Thu, 15 Sep 2011 09:13:25 -0700 Received: from [172.30.8.86] ([172.30.8.86]) by PR1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 16 Sep 2011 01:13:24 +0900 Message-ID: <4E72241F.5060402@codesourcery.com> Date: Thu, 15 Sep 2011 16:13: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: gdb@sourceware.org Subject: Re: GDB 7.2 gets SIGSEGV when step into a function in a shared library References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed 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 Delivered-To: mailing list gdb@sourceware.org X-SW-Source: 2011-09/txt/msg00054.txt.bz2 Content-length: 1634 On 09/15/2011 12:21 AM, Liang Cheng wrote: > Hi, > > The application and library under debug were built for ARM. The > target is running Android OS, > and the host is Linux X86 64. As long as we try to step into the > function xa_fun_in_lib, it would > cause segmentation fault in gdb. Same thing happened if step the instructions. > > Here are the experiments I did for this issue, and some notes. > If you are reporting a problem of gdb, please describe the problem as clear as possible. A clean and simple debug session is helpful for other people here to understand what is your problem. Please don't mix the experiments or your work in the problem description. > > So far I am stuck because of no idea why PC gets messed up. Anyone > else the similar issue > when trying to debug function in library? And any input to how to > investigate gdb/gdbserver side > also is appreciated. (below some other information is dumped). > Due to lack of clear steps you did in gdb, and its output, I have no idea what the problem is and how do you get to the problem, except for some wild guess, > (gdb) disassemble /m 0x8d14 > Dump of assembler code for function main: > .... > 286 z = xa_fun_in_lib(10); > => 0x00008d18<+84>: mov.w r0, #10 > 0x00008d1c<+88>: blx 0x8628 > 0x00008d20<+92>: mov r3, r0 > 0x00008d22<+94>: str r3, [r7, #44] ; 0x2c How do you get SIGSEGV from here? I guess you typed `step' try to step into xa_fun_in_lib, but get a SIGSEGV afterwards. Last but not least, as Hui suggested, please try GDB 7.3 release or GDB CVS trunk. -- Yao (齐尧)