target: riscv-011: don't change 'debug_level' during target polling
In the riscv fork, [1] has disable the debug log during target polling, with message: Improve low-level logging. Now logging is consistent and more readable. I did remove most logging during riscv_poll() since it clutters up the log/screen and is not generally helpful. This is questionable, because if the user enables the debug log, the messages should all be logged. Drop the code that overwrites the 'debug_level'. Link: https://github.com/riscv-collab/riscv-openocd/commit/54c65a9a4b71 [1] Change-Id: Ia86b998cf654760f36c2f217d44bcb9ffd9c3a94 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/9072 Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Tomas Vanek
parent
768b4084eb
commit
da96d3d41b
@@ -1931,11 +1931,6 @@ static int poll_target(struct target *target, bool announce)
|
||||
{
|
||||
jtag_add_ir_scan(target->tap, &select_dbus, TAP_IDLE);
|
||||
|
||||
/* Inhibit debug logging during poll(), which isn't usually interesting and
|
||||
* just fills up the screen/logs with clutter. */
|
||||
int old_debug_level = debug_level;
|
||||
if (LOG_LEVEL_IS(LOG_LVL_DEBUG))
|
||||
debug_level = LOG_LVL_INFO;
|
||||
bits_t bits = {
|
||||
.haltnot = 0,
|
||||
.interrupt = 0
|
||||
@@ -1943,8 +1938,6 @@ static int poll_target(struct target *target, bool announce)
|
||||
if (read_bits(target, &bits) != ERROR_OK)
|
||||
return ERROR_FAIL;
|
||||
|
||||
debug_level = old_debug_level;
|
||||
|
||||
if (bits.haltnot && bits.interrupt) {
|
||||
target->state = TARGET_DEBUG_RUNNING;
|
||||
LOG_DEBUG("debug running");
|
||||
|
||||
Reference in New Issue
Block a user