From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26258 invoked by alias); 25 Aug 2004 14:33:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 26240 invoked from network); 25 Aug 2004 14:33:25 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sourceware.org with SMTP; 25 Aug 2004 14:33:25 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id JAA30752 for ; Wed, 25 Aug 2004 09:47:49 -0400 Received: from [10.12.1.181] (dhcpa181 [10.12.1.181]) by smtp.ott.qnx.com (8.8.8/8.6.12) with ESMTP id KAA12707; Wed, 25 Aug 2004 10:26:54 -0400 Message-ID: <412CA1C7.6090403@qnx.com> Date: Wed, 25 Aug 2004 14:33:00 -0000 From: Kris Warkentin User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) MIME-Version: 1.0 To: Hinko Kocevar CC: gdb@sources.redhat.com Subject: Re: remote debugging and source files References: <412B4B05.8060705@iskramedical.si> <412B5FE6.8080406@iskramedical.si> <412B6515.2030501@iskramedical.si> <412B6ABC.9060804@qnx.com> <412B7E21.2080500@iskramedical.si> <412B82CB.4000503@qnx.com> <412C9AFC.70608@iskramedical.si> In-Reply-To: <412C9AFC.70608@iskramedical.si> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00372.txt.bz2 Hinko Kocevar wrote: > It is same version on the host and on the target - glibc-2.3.2., but > the one on target is cross compiled for ARM architecture, though. Is > there any other kind of difference we are interested here? No, what I mean is that gdb loads the arm binaries from the host. Those binaries need to be the same binaries as the target is running. > > Sounds easy, but to me, it is not - at all :). > OK, here goes... > I did 'maintenance info breakpoints' while debugging native app: > ... > -16 shlib events keep y 0x4000dd60 <_dl_debug_state_internal> > breakpoint already hit 3 times > ... > > So debugger stoped on shared library event 3 times (three dynamic libs > were loaded) at <_dl_debug_state_internal> symbol found in > ld-2.3.2.so. Using objdump I got the same offset, 0x0000dd60, for > _dl_debug_state_internal. > > On ARM target using the same technique, shlib events are at 0x4000b8d8 > while arm-linux-objdump says that _dl_debug_state_internal is at > offset 0x0000c258. After setting breakpoint to 0x0000c258 debugger > stopped 7 times (according to comments around r_debug that is OK) > before my app was stated. > > Offset 0x0000b8d8 is location in _dl_signal_error. > > So how do I convince gdb to use correct address for shlib event? At this stage I'm beginning to get confused about which binaries are being discussed here since you're comparing the native version with the remote. What I need to verify first is whether or not the ARM binaries (libs and app) on the host are EXACTLY the same as the binaries on the target. Then we need to verify that gdb is finding the correct ones. If all that is true and it's still not working, then we may need to dig deeper into why the solib breakpoint is being calculated incorrectly. Can you verify that auto-solib-add is on as well? cheers, Kris