avatartwo / avatar2

Python core of avatar²
Apache License 2.0
518 stars 98 forks source link

Add UNIX socket support for GDBProtocol and protocol users #97

Closed grant-h closed 2 years ago

grant-h commented 2 years ago

This PR adds support for using UNIX sockets for GDB connections instead of TCP. If this PR makes it in, I plan on doing the same for QMP and possibly for the GDBPlugin. The goal is to remove the dependency on port availability, which should remove cross Avatar2 instance contention.

One aspect I didn't consider was where the sockets should be created by default since I use is not None to detect if UNIX should be used. Maybe sockets should be automatically placed in the avatar2 output directory (which should be unique per instance), but this would require more invasive changes to the KWArgs for transport selection.

Testing

hello_world.py, test_gdbprotocol.py, and test_qemutarget.py (ARM) were ran and new tests using the UNIX transport were added.

mariusmue commented 2 years ago

Thanks @grant-h! We are currently working on CI improvements, once done, we will happily include the PR.