From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30669 invoked by alias); 24 Jun 2010 18:12:15 -0000 Received: (qmail 30655 invoked by uid 22791); 24 Jun 2010 18:12:14 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jun 2010 18:12:09 +0000 Received: by vws4 with SMTP id 4so2950283vws.0 for ; Thu, 24 Jun 2010 11:12:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.64.131 with SMTP id e3mr2175915qai.193.1277403126913; Thu, 24 Jun 2010 11:12:06 -0700 (PDT) Received: by 10.229.86.72 with HTTP; Thu, 24 Jun 2010 11:12:06 -0700 (PDT) Date: Thu, 24 Jun 2010 18:12:00 -0000 Message-ID: Subject: [ARM] dlopen and remote debugging From: "karthikeyan.s" To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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: 2010-06/txt/msg00119.txt.bz2 Hi, We recently encountered an issue with gdb wherein it does not get the symbols from a shared library when loaded with dlopen. The following steps does not give us the shared library's symbols. The binary is Xorg. 1) gdbserver :10000 /usr/bin/X -ac set sysroot target remote 10.0.0.3:10000 continue cntrl-C We do not get the library's symbols here. But with cat /proc/{x_pid}/maps we can see the library is loaded in memory. 2) But with the following steps, the libraries get loaded /usr/bin/X -ac & gdbserver :10000 --attach set sysroot target remote 10.0.0.3:10000 We can see the library's symbols and hit breakpoint, debug etc. etc. Architecture - ARM cortex-a9 toolchain - codesourcery arm-none-linux-gnueabi gdb version - 7.1.50 (almost the latest!) The library built with -g2 -ggdb and is not stripped. Any reason for the first method to not load the symbols? What part of gdb code should I dig into for this? Regards, Karthik