This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How does remote debugging work on image with symbol stripped?
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: kkcheng <kkhcheng at hotmail dot com>
- Cc: gdb at sourceware dot org
- Date: Sat, 2 May 2009 08:57:42 -0700
- Subject: Re: How does remote debugging work on image with symbol stripped?
- References: <23347162.post@talk.nabble.com>
On Sat, May 2, 2009 at 8:29 AM, kkcheng <kkhcheng@hotmail.com> 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