-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[lldb] Do not stop the process on SIGWINCH by default. #163182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SIGWINCH is sent when the terminal window size changes.. Most people debugging do not want the process on this signal. When using lldb-dap, the user may be using an integrated terminal and may resize the pane/window mulitple times when debugging. this causes the signal to be sent multiple times. It gets in the way. The process ignores this signal by default
|
@llvm/pr-subscribers-lldb Author: Ebuka Ezike (da-viper) ChangesSIGWINCH is sent when the terminal window size changes.. Most people debugging do not want the process on this signal. When using lldb-dap, the user may be using an integrated terminal and may resize the pane/window mulitple times when debugging. this causes the signal to be sent multiple times. It gets in the way. The process ignores this signal by default Full diff: https://github.com/llvm/llvm-project/pull/163182.diff 2 Files Affected:
diff --git a/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp b/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
index 15981a2c1cb80..a8d18f774c361 100644
--- a/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/GDBRemoteSignals.cpp
@@ -47,7 +47,7 @@ void GDBRemoteSignals::Reset() {
AddSignal(25, "SIGXFSZ", false, true, true, "file size limit exceeded");
AddSignal(26, "SIGVTALRM", false, true, true, "virtual time alarm");
AddSignal(27, "SIGPROF", false, false, false, "profiling time alarm");
- AddSignal(28, "SIGWINCH", false, true, true, "window size changes");
+ AddSignal(28, "SIGWINCH", false, false, false, "window size changes");
AddSignal(29, "SIGLOST", false, true, true, "resource lost");
AddSignal(30, "SIGUSR1", false, true, true, "user defined signal 1");
AddSignal(31, "SIGUSR2", false, true, true, "user defined signal 2");
diff --git a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
index 5346babc18576..dbbfc6a352e02 100644
--- a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -160,7 +160,7 @@ void LinuxSignals::Reset() {
ADD_LINUX_SIGNAL(25, "SIGXFSZ", false, true, true, "file size limit exceeded");
ADD_LINUX_SIGNAL(26, "SIGVTALRM", false, true, true, "virtual time alarm");
ADD_LINUX_SIGNAL(27, "SIGPROF", false, false, false, "profiling time alarm");
- ADD_LINUX_SIGNAL(28, "SIGWINCH", false, true, true, "window size changes");
+ ADD_LINUX_SIGNAL(28, "SIGWINCH", false, false, false, "window size changes");
ADD_LINUX_SIGNAL(29, "SIGIO", false, true, true, "input/output ready/Pollable event", "SIGPOLL");
ADD_LINUX_SIGNAL(30, "SIGPWR", false, true, true, "power failure");
ADD_LINUX_SIGNAL(31, "SIGSYS", false, true, true, "invalid system call");
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|
Can you add a line in the release notes about this change? I'm sure somebody will notice this change and we should have a place to point them. |
|
will do. I also created an RFC just in case there is any reason it is off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. If it's not stopping on the BSDs or Darwin I don't see any particular reason it would stop on Linux.
In the release note, show the command to re-enable stopping for this signal.
SIGWINCH is sent when the terminal window size changes.. Most people debugging do not want the process on this signal.
When using lldb-dap, the user may be using an integrated terminal and may resize the pane/window mulitple times when debugging. this causes the signal to be sent multiple times. It gets in the way.
The process ignores this signal by default