Skip to content

[lldb] Fix term-width setting (#82736) #8268

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

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

JDevlieghere
Copy link

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
(cherry picked from commit afd4690)

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
(cherry picked from commit afd4690)
@JDevlieghere
Copy link
Author

@swift-ci please test

afd4690 fixed the type of the term-width setting but the getter
(Debugger::GetTerminalWidth) was still trying to get the terminal width
as an unsigned. This fixes TestXMLRegisterFlags.py.

(cherry picked from commit 354401f)
@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere
Copy link
Author

@swift-ci please test macos

@JDevlieghere
Copy link
Author

@swift-ci please test windows

1 similar comment
@JDevlieghere
Copy link
Author

@swift-ci please test windows

@JDevlieghere JDevlieghere merged commit e276a0f into stable/20230725 Feb 26, 2024
@JDevlieghere JDevlieghere deleted the jdevlieghere/rdar/123488999 branch February 26, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant