Skip to content

[lldb] fix set SBLineEntryColumn #130435

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 3 commits into from
Mar 10, 2025

Conversation

da-viper
Copy link
Contributor

@da-viper da-viper commented Mar 8, 2025

Calling the public API SBLineEntry::SetColumn() sets the row instead of the column.

This probably should be backported as it has been since version 3.4.

@da-viper da-viper requested a review from JDevlieghere as a code owner March 8, 2025 19:53
@llvmbot llvmbot added the lldb label Mar 8, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2025

@llvm/pr-subscribers-lldb

Author: None (Da-Viper)

Changes

Calling the public API SBLineEntry::SetColumn() sets the row instead of the column.

This probably should be backported as it has been since version 3.4.


Full diff: https://github.com/llvm/llvm-project/pull/130435.diff

1 Files Affected:

  • (modified) lldb/source/API/SBLineEntry.cpp (+1-1)
diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp
index 216ea6d18eab8..0f4936f32a074 100644
--- a/lldb/source/API/SBLineEntry.cpp
+++ b/lldb/source/API/SBLineEntry.cpp
@@ -137,7 +137,7 @@ void SBLineEntry::SetLine(uint32_t line) {
 void SBLineEntry::SetColumn(uint32_t column) {
   LLDB_INSTRUMENT_VA(this, column);
 
-  ref().line = column;
+  ref().column = column;
 }
 
 bool SBLineEntry::operator==(const SBLineEntry &rhs) const {

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can you add a simple API test that sets the column and then checks that it contains the new value?

@JDevlieghere JDevlieghere merged commit e9b2edd into llvm:main Mar 10, 2025
6 of 9 checks passed
@da-viper da-viper deleted the fix-SBLineEntry-setColumn branch March 16, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants