This is an archive of the discontinued LLVM Phabricator instance.

fix D103172
AbandonedPublic

Authored by wallace on Aug 4 2021, 1:33 AM.

Details

Summary

D103172 has a couple of mistakes when modifying a variable outside the for loop. I really don't know how to make a test for this, so feel free to commandeer this diff and finish it.

With this patch I was able to set breakpoints on a complex binary I have.

Diff Detail

Event Timeline

wallace created this revision.Aug 4 2021, 1:33 AM
wallace requested review of this revision.Aug 4 2021, 1:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2021, 1:33 AM
wallace edited the summary of this revision. (Show Details)Aug 4 2021, 1:34 AM

I think this part of the patch can just be reverted. Thanks for tracking this down! Reverted the respective changes in e4977f9cb58ff7820d0287ba309490af57787749

Feel free to close this. I'll see that we can give this code some test coverage.

wallace abandoned this revision.Aug 4 2021, 8:39 AM

Thanks!

I think this part of the patch can just be reverted. Thanks for tracking this down! Reverted the respective changes in e4977f9cb58ff7820d0287ba309490af57787749

Feel free to close this. I'll see that we can give this code some test coverage.

Couldn't e4977f9cb58ff7820d0287ba309490af57787749, which looks like:

-  for (DWARFDIE src_die : src_class_die.children()) {
+  for (src_die = src_class_die.GetFirstChild(); src_die.IsValid();
+       src_die = src_die.GetSibling()) {

Just been:

-  for (DWARFDIE src_die : src_class_die.children()) {
+ for (src_die : src_class_die.children()) {

?