From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22804 invoked by alias); 5 Jun 2009 11:03:20 -0000 Received: (qmail 22789 invoked by uid 22791); 5 Jun 2009 11:03:18 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail178.messagelabs.com (HELO mail178.messagelabs.com) (85.158.139.19) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 05 Jun 2009 11:03:10 +0000 X-VirusChecked: Checked X-Env-Sender: Noel.Vellemans@visionBMS.com X-Msg-Ref: server-6.tower-178.messagelabs.com!1244199786!13525549!1 X-StarScan-Version: 6.0.0; banners=-,-,- Received: (qmail 29463 invoked from network); 5 Jun 2009 11:03:06 -0000 Received: from gateway.loepfe.com (HELO gateway.loepfe.com) (195.134.156.204) by server-6.tower-178.messagelabs.com with SMTP; 5 Jun 2009 11:03:06 -0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: GDB/GDBSERVER 6.8 for ARM targets not working ?? Date: Fri, 05 Jun 2009 11:03:00 -0000 Message-ID: <1531E53627F1F749B4FE809BF2A4EB6701009339@WETMEX10.loepfe.com> In-Reply-To: <1531E53627F1F749B4FE809BF2A4EB6701009203@WETMEX10.loepfe.com> References: <1531E53627F1F749B4FE809BF2A4EB6701009203@WETMEX10.loepfe.com> From: "Vellemans, Noel" To: 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: 2009-06/txt/msg00048.txt.bz2 Hi guy's=20 Took me some time ... But ... just got it working by falling back to 6.7.1. So GDB/GDBSERVER 6.8 must be broken for ARM. =20 Regards Noel. -----Original Message----- From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf Of Vellemans, Noel Sent: 5Jun09 09:50 To: gdb@sourceware.org Subject: GDB/GDBSERVER 6.8 for ARM targets not working ?? Hi all, Someone out there who can try to describe me what is going on with GDBSERVER? =20 Been trying for (several WEEKS, yes that long :-( ) to 'cross'-debug something quite simple and can not get this done. The goal is to debug REMOTE an application. (Between a host x86 and a target ARM) =20 I've build a simple application (that contains p-threads and can not debug this with GDBSERVER & GDB) [this application is called 'threading'] Been trying 1000 things... but I guess by explaining my last findings that I might get some attention/help. Please FIRST have a look on the following working / not working list. A) Running GDB on the ARM-target (native) is: WORKING.=20=20 (typed 'gdb ./threading' on the TARGET) B) Running GDB on the host and GDBSERVER on the target: FAILS. {This is what I need} ( .gdbinit has set solib******* statements.. included } C) Running GDB and GBDSERVER on the ARM-target : FAILS {yes both on the same target, console 1 'gdbserver *:9000 ./threading' console 2 'gdb' } ( .gdbinit contains then 'target remote 127.0.0.1:9000') =20=20=20=20=20=20 D) Running GDB natively on the host : WORKING=20 { yes I have recompiled the 'threading' application for the host here :-) } E) Running GDBSERVER on host and GDB on host (same [1 pc] or different [2 pc's]) : WORKING=20 ( .gdbinit contains then 'target remote 127.0.0.1:9000' or 'target remote xxx.xxx.xxx.xxx:9000' ) { I also quad-triple checked all. } { STRIPPING - bin's/libs turned off, DEBUG support for threads/pthreads is ENABLED.. } { libthread_db.* and a lot of other libs are on the target (via NFS) and are NOT stripped } { symbols are loaded by the gdb debugger .. paths to libs are fine ... etc .. etc..} { using GDB 6.8 in all cases } There must be something going on with GDBserver for ARM but what? Some more DETAILS now: want to break on line 48 -> this way a can show you what is going wrong. 41 int main() 42 { 43 pthread_t threads[NUM_THREADS]; 44 int rc, t; 45 for(t=3D0;t 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-linux-uclibc"... (NOEL-GDB)b main.c:48 Reading in symbols for sources/main.c... and sources/main.c...done. Breakpoint 1 at 0x87f8: file sources/main.c, line 48. (NOEL-GDB)c The program is not being run. (NOEL-GDB)r Reading symbols from /lib/ld-uClibc.so.0...done. Reading symbols from /lib/libpthread.so.0...done. [Thread debugging using libthread_db enabled] [New Thread 0x400 (LWP 942)] Reading symbols from /lib/libgcc_s.so.1...done. Reading symbols from /lib/libc.so.0...done. Stopped due to shared library event (NOEL-GDB)l 37 } 38 pthread_exit(NULL); 39 } 40 41 int main() 42 { 43 pthread_t threads[NUM_THREADS]; 44 int rc, t; 45 for(t=3D0;t> **** **** *B * & *C * (NOT WORKING ) **** **** If you look at the GDBserver/ GDB runs, I have this result.=20 {Please note that the same applies for case B & C (GDBserver/GDB on TARGET and GDB on host and GDBSERVER on target). *After starting GDBserver on console1 # gdbserver *:9000 ./threading Process ./threading created; pid =3D 958 Listening on port 9000 Remote debugging from host 127.0.0.1 *Starting gdb on console 2 #gdb GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-linux-uclibc". Reading symbols from /root/source/threading/threading...done. Using host libthread_db library "/lib/libthread_db.so.1". [New Thread 958] Reading symbols from /lib/ld-uClibc.so.0...done. 0x40000930 in _start () from /lib/ld-uClibc.so.0 (NOEL-GDB)b main.c:48 Reading in symbols for sources/main.c... and sources/main.c...done. Breakpoint 1 at 0x87f8: file sources/main.c, line 48. (NOEL-GDB)c Reading symbols from /lib/libpthread.so.0...done. Reading symbols from /lib/libgcc_s.so.1...done. Reading symbols from /lib/libc.so.0...done. Stopped due to shared library event (NOEL-GDB)c Stopped due to shared library event (NOEL-GDB)l 37 } 38 pthread_exit(NULL); 39 } 40 41 int main() 42 { 43 pthread_t threads[NUM_THREADS]; 44 int rc, t; 45 for(t=3D0;t> What is going on ??? * Is there anyone that has a similar setup (GDBSEVER and GDB for target-arm multithreaded aplication) running fine ? If so which version of GDB/GDBSERVER are you running ?????? * Is there a known WORKING version for this problem ? Kind regards. Noel.