Skip to content

[lldb] Use reflection to get the dynamic type of a class #3204

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

augusto2112
Copy link

No description provided.

Copy link

@adrian-prantl adrian-prantl left a comment

Choose a reason for hiding this comment

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

Great work!

if (objc_runtime->GetDynamicTypeAndAddress(
in_value, use_dynamic, class_type_or_name, address, value_type)) {
bool found = false;
ForEachSuperClassType(in_value, [&](SuperClassType sc) -> bool {

Choose a reason for hiding this comment

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

Can you add a comment here explaining why we are filtering out private Foundation types?

@@ -4,7 +4,7 @@
// REQUIRES: system-darwin
// REQUIRES: swift

// RUN: %lldb --repl < %s 2>&1 | FileCheck %s
// RUN: %lldb --repl < %s | FileCheck %s

Choose a reason for hiding this comment

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

why do we need to filter out stderr output?

Copy link
Author

Choose a reason for hiding this comment

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

Some unrelated warnings were making this test fail, so I thought I'd remove stderr since that's not what the test is checking for.

Choose a reason for hiding this comment

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

Hmm, yeah. It doesn't seem to be necessary given the CHECK lines.

@augusto2112 augusto2112 force-pushed the remove-remoteast-from-GetDynamicTypeAndAddress_Class branch from 375a0fa to 824e91c Compare August 27, 2021 12:59
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112
Copy link
Author

@swift-ci test

1 similar comment
@augusto2112
Copy link
Author

@swift-ci test

@augusto2112
Copy link
Author

Ran tests locally and don't see any failures caused by this PR

@augusto2112 augusto2112 merged commit ca25ed6 into swiftlang:stable/20210726 Sep 17, 2021
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.

2 participants