It would be very useful during challenge development to run the challenge in the container and attach gdb to it. I think the best way to enable this is to allow opening a port to a listening instance of gdbserver.
The Build.mk variable could be called DOCKER_GDBSERVER_PORT. When this is set to a port number, it'll do one of two things (I still need to think about this):
Override the container's entrypoint to run pwnable_server under gdbserver, which will listen on the given port.
Override the command launched by pwnable_server upon receiving a connection to instead run it under gdbserver.
PwnableHarness will also need to add the port forwarding options. The gdbserver port should only ever be exposed on localhost.
It would be very useful during challenge development to run the challenge in the container and attach gdb to it. I think the best way to enable this is to allow opening a port to a listening instance of
gdbserver
.The
Build.mk
variable could be calledDOCKER_GDBSERVER_PORT
. When this is set to a port number, it'll do one of two things (I still need to think about this):pwnable_server
undergdbserver
, which will listen on the given port.pwnable_server
upon receiving a connection to instead run it undergdbserver
.PwnableHarness will also need to add the port forwarding options. The gdbserver port should only ever be exposed on localhost.