Enable GDB Python support

Sysprogs forums Forums VisualGDB Enable GDB Python support

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11836
    tw39124
    Participant

    Hi,

    I am trying to write some scripts to do automated white-box testing of our embedded projects using VisualGDB (using your pre-built SysGCC toolchain). I’d like to do things like automatically set breakpoints, start/stop execution, inspect and modify variable values, prompt the user for input and print the results of the automated tests. However, the standard GDB scripting support (https://sourceware.org/gdb/onlinedocs/gdb/Command-Files.html) is pretty basic, especially when it comes to user interaction. GDB does provide a rich Python API, but requires GDB to have been compiled with the  “–with-python” flag. Being able to use Python would make the job of writing these automated scripts much easier. Is it possible that could you enable Python support in the pre-built SysGCC binaries that you distribute?

    Thanks.

    #11841
    support
    Keymaster

    Hi,

    VisualGDB actually allows running unit tests directly on embedded devices with no special scripting required: https://visualgdb.com/tutorials/tests/arm/

    We would recommend using this functionality instead of scripting it manually. If this does not work, we would be happy to hear feedback and suggestions on improving our unit testing framework to support your case.

    #11848
    tw39124
    Participant

    Sorry, perhaps I should have clarified what I meant by “white-box testing”. What I am trying to do is not unit testing, it is more like integration testing

    • Injecting fault conditions by breakpointing and modifying variables
    • Simulating hardware faults
    • Checking that certain code paths are executed when system input occurs

    We already use Unity for unit tests which works fine, but obviously it only tests isolated software components, not the software application as a whole. That is what this integration testing is intended to do, and why we ideally need to be able to write scripts to automate this procedure.

    #12145
    support
    Keymaster

    Hi,

    Just wanted to let you know that we have added support for embedded integration tests to VisualGDB 5.3 Preview 7. The tests use a mechanism similar to what you described – VisualGDB will record your actions while you step through the program, let you add custom checks and then automatically reply recorded actions when running the tests. Feel free to give it a try and let us know if you miss any functionality.

    #12469
    tw39124
    Participant

    Wow. I’ve not tried it yet, but this looks like exactly what I’m after, thanks. I will give it a go and provide feedback.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.