edb-debugger icon indicating copy to clipboard operation
edb-debugger copied to clipboard

Add remote debug support (gdbserver)

Open ret5et opened this issue 10 years ago • 8 comments

Add gdbserver support.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ret5et avatar Jul 19 '15 10:07 ret5et

This is something that I've wanted to do for a bit. It's a non-trivial amount of effort, but I'll work towards it :-)

eteran avatar Jul 19 '15 18:07 eteran

:+1:

Currently having to use gdb to create a breakpoint on shared lib load, just to pass it to edb manually.

mcd1992 avatar Oct 07 '15 20:10 mcd1992

:+1:

giomasce avatar Apr 15 '16 17:04 giomasce

I hear you guys, will start working towards it. Hopefully, we will be able to encapsulate everything we need to do in the DebuggerCore plugin.

eteran avatar Apr 15 '16 20:04 eteran

I think it'll be great if GDB/MI is added as a new Platform/Arch. Then we'll automatically be able to support lots of different architectures with at least basic debugging capabilities (load, step, set breakpoints, even basic disassembly). This will also make adding remote debugging capability trivial.

10110111 avatar Aug 02 '17 11:08 10110111

Agreed.

Hopefully, the work to support ARM will indirectly help in adding abstractions and architecture independence where we need it to support this kind of thing.

The main thing I wonder about is how efficiently we can read/write memory from the debugee. I suppose that the speed will be whatever it will be, and will be worth the flexibility gained.

eteran avatar Aug 02 '17 13:08 eteran

The speed will be not faster than needed to transfer textual representation of data, since gdbserver protocol is textual. Also, GDB/MI is, although machine-oriented, still textual too.

But I don't think the speed loss is too important: we don't want to convert everything to the slowest interface — only the GDB back-end will be slower, others should be left as they are speed-wise.

10110111 avatar Aug 02 '17 14:08 10110111

Also note that what I'm suggesting here is not tied to remote. GDB/MI can be used to debug local apps. It's the interface used by GDB front-ends like QtCreator, DDD, CGDB, KDevelop, Eclipse etc..

10110111 avatar Aug 02 '17 14:08 10110111