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.
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 NDEBUGon top of gdbserver.c, but it might be worthwile to rewrite these assertions to be side-effect free.