When running the debugger "set stop-on-solib-events 1" is invoked and the debugger is stopped on solib event
Type: Debugger Input information below
Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.
Describe the bug
- OS and Version: Debian 4.9.18-1
- VS Code Version: 1.30.2
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them):
- A clear and concise description of what the bug is.
I can't attach the logs due to company restriction but I can tell you that when enabling the logger with "engineLogging" I can see that
1: (2569) <-1006-gdb-set stop-on-solib-events 1
and after a while:
1: (7067) ->~"Stopped due to shared library event (no libraries added or removed)\n" 1: (7067) ->*stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="7" Stopped due to shared library event (no libraries added or removed)
This is happening also if I explicitly add a setup command for disabling the "stop-on-solib-events", in that case I first see the "gdb-set stop-on-solib-events 0" is invoked and then the "gdb-set stop-on-solib-events 1" is invoked (and overrides the first command)
I removed all .initgdb files, and also tried to run gdb with "-nx" arg to eliminate any use of config files, where do these config are coming from and how to edit them?
The command is sent within the debugger engine.
It is set here: https://github.com/Microsoft/MIEngine/blob/d1189348e9bfd4e7843cbceb9db16509284acf76/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs#L692 Then unset here: https://github.com/Microsoft/MIEngine/blob/d1189348e9bfd4e7843cbceb9db16509284acf76/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs#L345
It seems like we stop on a solib event to clear an terminal error message from a gdb bug.
// The stop cause by first module load seems to be the perfect timing to clear the terminal, // that's why we still need to initially turn stop-on-solib-events on then turn it off after the first stop.
https://github.com/Microsoft/MIEngine/blob/d1189348e9bfd4e7843cbceb9db16509284acf76/src/MIDebugEngine/Engine.Impl/DebuggedProcess.cs#L684
Is there an update on this? I have the same problem, and as you said it seems to reset the console to clear a messge (due to the "Failed to set controlling terminal: Operation not permitted" bug mentioned in the source code) However it doesn't seem to unset the stop-on-solib-events to 0.
Note that this makes it really hard to use the new "Logpoint" feature because the debug console is flooded with:
"Stopped due to shared library event:"
messages. Is there anyway to hide the shared library event output?