[all-commits] [llvm/llvm-project] afd469: [lldb] Fix term-width setting (#82736)

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Feb 22 21:49:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afd469023aad10786eaea3d444047a558ad8d5c1
      https://github.com/llvm/llvm-project/commit/afd469023aad10786eaea3d444047a558ad8d5c1
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
    M lldb/include/lldb/Interpreter/OptionValueSInt64.h
    M lldb/include/lldb/Interpreter/OptionValueUInt64.h
    M lldb/source/Core/CoreProperties.td
    M lldb/source/Core/Debugger.cpp
    M lldb/source/Interpreter/OptionValueUInt64.cpp
    M lldb/test/API/commands/settings/TestSettings.py
    M lldb/test/API/functionalities/progress_reporting/TestTrimmedProgressReporting.py

  Log Message:
  -----------
  [lldb] Fix term-width setting (#82736)

I noticed that the term-width setting would always report its default
value (80) despite the driver correctly setting the value with
SBDebugger::SetTerminalWidth.

```
(lldb) settings show term-width
term-width (int) = 80
```

The issue is that the setting was defined as a SInt64 instead of a
UInt64 while the getter returned an unsigned value. There's no reason
the terminal width should be a signed value. My best guess it that it
was using SInt64 because UInt64 didn't support min and max values. I
fixed that and correct the type and now lldb reports the correct
terminal width:

```
(lldb) settings show term-width
term-width (unsigned) = 189
```

rdar://123488999



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list