This is an archive of the discontinued LLVM Phabricator instance.

Create ScopedTimeout class for GDBRemoteCommunication
ClosedPublic

Authored by tberghammer on Feb 23 2015, 3:50 AM.

Details

Summary

Create ScopedTimeout class for GDBRemoteCommunication

This new class makes it easier to change the timeout of a GDBRemoteCommunication instance for a short time and then restore it to its original value.

Requested by @ovyalov in D7788

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer retitled this revision from to Create ScopedTimeout class for GDBRemoteCommunication.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added reviewers: ovyalov, clayborg.
tberghammer added subscribers: Unknown Object (MLST), ovyalov.
clayborg accepted this revision.Feb 23 2015, 9:49 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Feb 23 2015, 9:49 AM
ovyalov accepted this revision.Feb 23 2015, 9:52 AM
ovyalov edited edge metadata.
ovyalov added inline comments.
source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
934 ↗(On Diff #20501)

You may put this statement in initializer list and make m_saved_timeout const;

tberghammer added inline comments.Feb 24 2015, 2:25 AM
source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
934 ↗(On Diff #20501)

I would prefer to leave it here because I think it is a bit cleaner (don't like complex expressions in the initializer list) and making it const don't make that big effect in a such simple class.

This revision was automatically updated to reflect the committed changes.