This allows us to add to the dfilter range as we go. Signed-off-by: Alex Bennée <alex.ben...@linaro.org> --- include/qemu/log.h | 1 + util/log.c | 6 ++++++ 2 files changed, 7 insertions(+)
diff --git a/include/qemu/log.h b/include/qemu/log.h index 8ed932ec24..f915b5bd91 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -117,6 +117,7 @@ void qemu_log_needs_buffers(void); void qemu_set_log_filename(const char *filename, Error **errp); void qemu_set_dfilter_ranges(const char *ranges, Error **errp); void qemu_reset_dfilter_ranges(void); +void qemu_append_dfilter_range(Range r, Error **errp); bool qemu_log_in_addr_range(uint64_t addr); int qemu_str_to_log_mask(const char *str); diff --git a/util/log.c b/util/log.c index c6c197cbb3..cc79a146d1 100644 --- a/util/log.c +++ b/util/log.c @@ -233,6 +233,12 @@ out: g_strfreev(ranges); } +void qemu_append_dfilter_range(Range r, Error **errp) +{ + maybe_allocate_dfilter(1); + g_array_append_val(debug_regions, r); +} + /* fflush() the log file */ void qemu_log_flush(void) { -- 2.17.1