[binutils-gdb] Replace make_cleanup_restore_current_traceframe with RAII class
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Sat Apr 7 20:11:00 GMT 2018
*** TEST RESULTS FOR COMMIT 6f14adc55864818ec3754460f5df4150c2addf42 ***
Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: 6f14adc55864818ec3754460f5df4150c2addf42
Replace make_cleanup_restore_current_traceframe with RAII class
I put the constructor in tracepoint.c because it needs to read
traceframe_number, and I prefer to do that than to expose
traceframe_number.
gdb/ChangeLog:
* tracepoint.c (struct current_traceframe_cleanup): Remove.
(do_restore_current_traceframe_cleanup): Remove.
(restore_current_traceframe_cleanup_dtor): Remove.
(make_cleanup_restore_current_traceframe): Remove.
(scoped_restore_current_traceframe::scoped_restore_current_traceframe):
New.
* tracepoint.h (struct scoped_restore_current_traceframe): New.
* infrun.c (fetch_inferior_event): Use
scoped_restore_current_traceframe.
More information about the Gdb-testers
mailing list