[Bug 40588] New: NativeProcessLinux::MonitorCallback incorrectly logs value of libc "signal" function

Bug ID 40588
Summary NativeProcessLinux::MonitorCallback incorrectly logs value of libc “signal” function
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter jcowgill+llvm@jcowgill.uk
CC llvm-bugs@lists.llvm.org

In commit 4d99ca2308f9 ("Add pretty-printer for wait(2) statuses and modernize
the code handling them"), the "signal" parameter was removed from
NativeProcessLinux::MonitorCallback. Unfortunately not all uses of this
parameter were removed and as a result these uses now refer to the "signal"
function from libc which is probably unintended!

Both users are debug logging calls.

Call 1:
 LLDB_LOG(log, "got exit signal({0}) , tid = {1} ({2} main thread)", signal,
          pid, is_main_thread ? "is" : "is not");

Call 2:
 LLDB_LOG(log,
          "GetSignalInfo failed: {0}, tid = {1}, signal = {2}, "
          "status = {3}, main_thread = {4}, thread_found: {5}",
          info_err, pid, signal, status, is_main_thread, thread_found);

labath@google.com changed bug 40588

What | Removed | Added |

Comment # 1 on bug 40588 from labath@google.com

Fixed by r353419. Thanks for the report.