From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1292 invoked by alias); 2 May 2009 15:57:54 -0000 Received: (qmail 1279 invoked by uid 22791); 2 May 2009 15:57:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 May 2009 15:57:47 +0000 Received: from spaceape13.eur.corp.google.com (spaceape13.eur.corp.google.com [172.28.16.147]) by smtp-out.google.com with ESMTP id n42FvjZ0003699 for ; Sat, 2 May 2009 08:57:45 -0700 Received: from qyk35 (qyk35.prod.google.com [10.241.83.163]) by spaceape13.eur.corp.google.com with ESMTP id n42Fvhfi030838 for ; Sat, 2 May 2009 08:57:43 -0700 Received: by qyk35 with SMTP id 35so6902914qyk.6 for ; Sat, 02 May 2009 08:57:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.86.196 with SMTP id t4mr2650983qcl.39.1241279862778; Sat, 02 May 2009 08:57:42 -0700 (PDT) In-Reply-To: <23347162.post@talk.nabble.com> References: <23347162.post@talk.nabble.com> Date: Sat, 02 May 2009 15:57:00 -0000 Message-ID: <8ac60eac0905020857q71d6ff97v7f6c328609afae9e@mail.gmail.com> Subject: Re: How does remote debugging work on image with symbol stripped? From: Paul Pluzhnikov To: kkcheng Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true 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-05/txt/msg00008.txt.bz2 On Sat, May 2, 2009 at 8:29 AM, kkcheng wrote: > > I understand that with GDB, one can remote debug a program with symbol > stripped, as long as the host machine has an unstripped image. Correct. > My question is how does it work GDB (on host) has access to all the debugging symbols, and communicates with gdbserver (on target) to read/write memory/registers and to control the inferior process. > and if it can be duplicate (easily) on other debugging > system as well. Many other debuggers (e.g. TotalView and Microsoft Visual Studio) implement a similar approach. > I assume somehow stripping the debugging info does not > impact the code and data section, Correct: most object file formats keep debug info separate, precisely so it can be stripped. > and wonder if images generated from > multiple elf files can go thru the same process. Yes, ELF images linked from multiple ELF object files can be stripped. Cheers, -- Paul Pluzhnikov