From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26676 invoked by alias); 25 Feb 2006 01:30:58 -0000 Received: (qmail 26668 invoked by uid 22791); 25 Feb 2006 01:30:57 -0000 X-Spam-Check-By: sourceware.org Received: from web35613.mail.mud.yahoo.com (HELO web35613.mail.mud.yahoo.com) (66.163.179.152) by sourceware.org (qpsmtpd/0.31) with SMTP; Sat, 25 Feb 2006 01:30:55 +0000 Received: (qmail 86450 invoked by uid 60001); 25 Feb 2006 01:30:54 -0000 Message-ID: <20060225013054.86448.qmail@web35613.mail.mud.yahoo.com> Received: from [65.96.163.54] by web35613.mail.mud.yahoo.com via HTTP; Fri, 24 Feb 2006 17:30:54 PST Date: Sat, 25 Feb 2006 12:48:00 -0000 From: EJS Subject: Trouble remote debugging To: gdb@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00317.txt.bz2 Hi, I am trying to remote debug a hello world program that was cross compiled on a cygwin host for a linux target (using crosstool). The problem that I am having is that the shared libaries are not being handled correctly by gdb. Specifically, if run gdb on the target machine my bt looks like: (gdb) bt #0 0x006ae7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 #1 0x00784253 in __read_nocancel () from /lib/tls/libc.so.6 #2 0x00729aa8 in _IO_file_read_internal () from /lib/tls/libc.so.6 #3 0x0072882e in _IO_new_file_underflow () from /lib/tls/libc.so.6 #4 0x0072ae0b in _IO_default_uflow_internal () from /lib/tls/libc.so.6 #5 0x0072abfd in __uflow () from /lib/tls/libc.so.6 #6 0x00725c5f in getc () from /lib/tls/libc.so.6 #7 0x080485ed in main () at hello.cpp:10 Whereas when I try the same bt connected remotely through gdbserver. I get (gdb) bt #0 0x006ae7a2 in ?? () #1 0x00784253 in ?? () #2 0x007f1ff4 in ?? () #3 0x00729aa8 in ?? () #4 0x00000000 in ?? () #5 0xb7ffe000 in ?? () #6 0x00000400 in ?? () from /opt/crosstool/gcc-3.4.4-glibc-2.3.5 -linux-gnu/lib/libstdc++.so.6 #7 0xbffff93c in ?? () #8 0x0072882e in ?? () #9 0x007f2720 in ?? () #10 0xb7ffe000 in ?? () #11 0x00000400 in ?? () from /opt/crosstool/gcc-3.4.4-glibc-2.3.5 -linux-gnu/lib/libstdc++.so.6 #12 0x007f1ff4 in ?? () #13 0x007f2720 in ?? () #14 0xb7fe76c0 in ?? () #15 0xbffff94c in ?? () #16 0x0072ae0b in ?? () #17 0x007f2720 in ?? () #18 0x007f2720 in ?? () #19 0xbffff964 in ?? () #20 0x0072abfd in ?? () #21 0x007f2720 in ?? () #22 0xbffffa24 in ?? () #23 0x007f1ff4 in ?? () #24 0x007f2720 in ?? () #25 0xbffff978 in ?? () #26 0x00725c5f in ?? () #27 0x007f2720 in ?? () #28 0xbffffa24 in ?? () #29 0xbffff9b0 in ?? () #30 0xbffff998 in ?? () #31 0x080485ed in main () at hello.cpp:10 As far as I know, I have set my solib-search-path correctly and my shlibs are being found as you can see from: (gdb) info share >From To Syms Read Shared Object Library 0x0003b920 0x000a8dc0 Yes /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un known-linux-gnu/i686-unknown-linux-gnu/lib/libstdc++.so.6 0x00003680 0x0001ac60 Yes /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un known-linux-gnu/i686-unknown-linux-gnu/lib/libm.so.6 0x00001680 0x000065c0 Yes /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un known-linux-gnu/i686-unknown-linux-gnu/lib/libgcc_s.so.1 0x000153d0 0x000ebbbc Yes /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un known-linux-gnu/i686-unknown-linux-gnu/lib/libc.so.6 0x00000760 0x0000f87f Yes /opt/crosstool/gcc-3.4.4-glibc-2.3.5/i686-un known-linux-gnu/i686-unknown-linux-gnu/lib/ld-linux.so.2 One thing that I noticed is that the symbol tables for the cross compiled shlibs are different than the ones on the target (I checked this via objdump -T). Is this the problem? If so how do I make them the same? Thanks, J __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com