Skip to content

Side effects in assert() break with NDEBUG #9

Description

@lluchs

If NDEBUG is set (which might happen when integrating this code with other applications), the code inside the assertions is not compiled. Therefore, the side effects (such as sscanf() scanning a string) don't happen anymore, which breaks certain commands (especially all File commands).

As a quick fix, I just stuck #undef NDEBUG on top of gdbserver.c, but it might be worthwile to rewrite these assertions to be side-effect free.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions