How to use the gdbgui.backend function in gdbgui

To help you get started, we’ve selected a few gdbgui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cs01 / gdbgui / tests / test_main.py View on Github external
def test_arguments_passed_to_gdb(monkeypatch, test_argv, expected_gdb_args):
    def mock_setup_backend(*args, **kwargs):
        pass

    monkeypatch.setattr(gdbgui.backend, "setup_backend", mock_setup_backend)
    monkeypatch.setattr(sys, "argv", test_argv)
    gdbgui.backend.main()

    state = StateManager(gdbgui.backend.app.config)
    assert len(state.get_gdb_args()) == len(expected_gdb_args)