eteran / edb-debugger

edb is a cross-platform AArch32/x86/x86-64 debugger.
GNU General Public License v2.0
2.68k stars 323 forks source link

Move debugger core functionality to separate process? #688

Open eteran opened 5 years ago

eteran commented 5 years ago

There are some platforms which will require root privileges to use the debugging API. It is probably undesirable to ask a user to run the debugger as root, so it is a cleaner design to have the debugger core gain root privileges by being a suid root binary.

We obviously would want to not sacrifice performance, so things such as reading large segments of memory would have to be well thought out.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/67847583-move-debugger-core-functionality-to-separate-process?utm_campaign=plugin&utm_content=tracker%2F14326212&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14326212&utm_medium=issues&utm_source=github).
10110111 commented 5 years ago

What are some examples of such platforms? It seems to require quite an error-prone changes for seemingly small gain (compared to running EDB as root).

I think, if this is to be done, it should be done simultaneously with implementing remote debugging functionality. Optimized reading of large segments of memory could be an additional feature, e.g. using shared memory or something like that. But by default the interaction could be via network.

AaronOpfer commented 5 years ago

Which platforms are you referring to?

eteran commented 5 years ago

macOS requires privileges last I checked, so do some of the BSDs.

eteran commented 5 years ago

@10110111 sure, in fact, it is my understanding that gdb is always using gdbserver, just when it's local it does it via UNIX domain sockets to the local host.

eteran commented 5 years ago

In particular, I'd like to see if edb can work well on macOS, as I think there's a lot of potentials there and not a lot of tools available for the types of things that edb can do.