This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How does remote debugging work on image with symbol stripped?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]