From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8229 invoked by alias); 12 Jan 2013 10:59:04 -0000 Received: (qmail 8221 invoked by uid 22791); 12 Jan 2013 10:59:03 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ia0-f169.google.com (HELO mail-ia0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 12 Jan 2013 10:58:56 +0000 Received: by mail-ia0-f169.google.com with SMTP id j5so167075iaf.0 for ; Sat, 12 Jan 2013 02:58:56 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.168.102 with SMTP id zv6mr1922562igb.9.1357988336067; Sat, 12 Jan 2013 02:58:56 -0800 (PST) Received: by 10.64.102.233 with HTTP; Sat, 12 Jan 2013 02:58:55 -0800 (PST) In-Reply-To: <50E474E3.7050605@redhat.com> References: <50D3FC31.1020103@indel.ch> <20121221161114.GA32638@host2.jankratochvil.net> <201212211917.qBLJH6Il028006@new.toad.com> <50E474E3.7050605@redhat.com> Date: Sat, 12 Jan 2013 10:59:00 -0000 Message-ID: Subject: Re: Ensure correct symbol-file when attaching to a (remote) process From: Martin Runge To: Pedro Alves , gdb@sourceware.org Cc: John Gilmore , Jan Kratochvil , Raphael Zulliger Content-Type: text/plain; charset=UTF-8 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: 2013-01/txt/msg00044.txt.bz2 I would really like to see such a feature in gdb, too. Our projects are Linux based, but the problem remains the same. We tried a self made patch that compared the most important sections of host and target binaries as a whole. Our projects are quite large (~260 MB stripped binaries) and that patch caused extra 30-60 seconds startup time for debugging, so we removed it again. in gdb 7.3 I see a similar feature already build in. I see warnings like this: warning: the debug information found in "/lib/libname.so" does not match "/lib/libname.so" (CRC mismatch). It shows up for all DSOs, that do not match between host and target, e.g. if the solib search path is not set correctly and gdb on the host looks at the host's library instead of the one that matches the target's. Who does this compare to your patch? 2013/1/2 Pedro Alves : > On 12/21/2012 07:17 PM, John Gilmore wrote: >> The best you can do in an automated way is to check the areas >> of memory that are intended to contain instructions and read-only >> data. > > For bare metal targets, that's often good enough, and GDB does have > support that built in: > > (gdb) help compare-sections > Compare section data on target to the exec file. > Argument is a single section name (default: all loaded sections). > > A build id check would really be ideal. > > -- > Pedro Alves >