avocado-framework/avocado — pull request #169 by clebergnu (2014-08-28 12:45:54+00:00)
Title: GDB: library and test

Transparent GDB support in avocado turned out to be a tricky task. To make the review and merge process more manageable, I decided to break it in two phases.

This first phase, introduces the Avocado GDB library and its accompanying test. It allows, if a test writer wishes, to interact with the GDB debugger in a programmatic fashion. A common session can be as simple as:

```
import avocado.gdb

debugger = avocado.gdb.GDB()
debugger.set_file("/path/to/binary")
debugger.run()
```

More advanced scenarios could include a remote debugger:

```
import avocado.gdb

server = avocado.gdb.GDBServer()
...
client = avocado.gdb.GDB()
client.connect(server.port)
client.set_file("/path/to/file")
client.run()
client.disconnect()
...
client.connect(server.port)
```

The `gdbtest`, includes 14 different test scenarios that validates the features of the GDB library.

The second phase of GDB support, for which the code is available at https://github.com/clebergnu/avocado/tree/gdb, will present this functionality to the user running tests, simply by using command line options.