This is an archive of the discontinued LLVM Phabricator instance.

[dexter] Add hit_count keyword arg to DexLimitSteps
ClosedPublic

Authored by Orlando on Apr 29 2021, 5:50 AM.

Details

Summary

The DexLimitSteps command leading breakpoint will be deleted after triggering 'hit_count' number of times if the argument is provided.

All the lit tests pass on linux (with lldb), and I've tested this on windows (with vs2017) manually as the lit tests for DexLimitSteps are currently unsupported on windows.

Diff Detail

Event Timeline

Orlando requested review of this revision.Apr 29 2021, 5:50 AM
Orlando created this revision.
Orlando updated this revision to Diff 341541.Apr 29 2021, 9:10 AM

+ Update Commands.md

Ping.

Alternatively we could a slightly more general keyword arg hit_count=<int> that limits the times the breakpoints can be triggered to any number, rather than just once. I'm not sure we need it right now, but it's more flexible. Does anyone have any opinion on this?

Ping.

Alternatively we could a slightly more general keyword arg hit_count=<int> that limits the times the breakpoints can be triggered to any number, rather than just once. I'm not sure we need it right now, but it's more flexible. Does anyone have any opinion on this?

That is certainly more generalised, however if a sensible use case isn't apparent I'd suggest holding fire.

lgtm, with one question. Is it necessary to have '=True' because of Python argument syntax, as opposed to passing 'is_one_shot' as an argument on its own?

Thanks for taking a look.

lgtm, with one question. Is it necessary to have '=True' because of Python argument syntax, as opposed to passing 'is_one_shot' as an argument on its own?

That's right, yeah. It would be nice to be able to pass in only is_one_shot but I'm not sure how we can do it easily?

chrisjackson accepted this revision.May 5 2021, 6:21 AM
This revision is now accepted and ready to land.May 5 2021, 6:21 AM
krmnparedes164 added a subscriber: krmnparedes164.EditedMay 5 2021, 7:58 PM

Ping.

Alternatively we could a slightly more general keyword arg hit_count=<int> that limits the times the breakpoints can be triggered to any number, rather than just once. I'm not sure we need it right now, but it's more flexible. Does anyone have any opinion on this?

That is certainly more generalised, however if a sensible use case isn't apparent I'd suggest holding fire.

On second thought, the more generalised command shouldn't have a much more complicated implementation. Additionally, usage of the function will be nearly identical to the user while being more flexible, so I think 'hit_count=<int>' should be added in favour of 'one_shot=<bool>'.

Orlando updated this revision to Diff 346958.May 21 2021, 2:02 AM
Orlando retitled this revision from [dexter] Add is_one_shot keyword arg to DexLimitSteps to [dexter] Add hit_count keyword arg to DexLimitSteps.
Orlando edited the summary of this revision. (Show Details)

+ Changed is_one_shot to hit_count. Updated patch title and summary.

Thanks both

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2021, 4:52 AM