aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rtos/rtos.c2
-rw-r--r--src/server/gdb_server.c4
-rw-r--r--src/target/breakpoints.c2
-rw-r--r--src/target/riscv/riscv.c45
-rw-r--r--src/target/target.c2
5 files changed, 8 insertions, 47 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 8b9eb4c..b055f91 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -432,7 +432,6 @@ int rtos_thread_packet(struct connection *connection, char const *packet, int pa
target->rtos->current_threadid = target->rtos->current_thread;
else
target->rtos->current_threadid = threadid;
- LOG_DEBUG("current_threadid=%ld", target->rtos->current_threadid);
}
gdb_put_packet(connection, "OK", 2);
return ERROR_OK;
@@ -517,7 +516,6 @@ int rtos_get_gdb_reg_list(struct connection *connection)
{
struct target *target = get_target_from_connection(connection);
int64_t current_threadid = target->rtos->current_threadid;
- LOG_DEBUG("current_threadid=%ld", target->rtos->current_threadid);
if ((target->rtos != NULL) && (current_threadid != -1) &&
(current_threadid != 0) &&
((current_threadid != target->rtos->current_thread) ||
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 503a435..0cfe0ec 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -96,7 +96,7 @@ struct gdb_connection {
char *thread_list;
};
-#if 1
+#if 0
#define _DEBUG_GDB_IO_
#endif
@@ -736,7 +736,7 @@ static void gdb_signal_reply(struct target *target, struct connection *connectio
struct target *ct;
if (target->rtos != NULL) {
target->rtos->current_threadid = target->rtos->current_thread;
- LOG_DEBUG("current_threadid=%ld", target->rtos->current_threadid);
+ LOG_DEBUG("current_threadid=%" PRId64, target->rtos->current_threadid);
target->rtos->gdb_target_for_threadid(connection, target->rtos->current_threadid, &ct);
} else {
ct = target;
diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c
index f76c318..58e4f61 100644
--- a/src/target/breakpoints.c
+++ b/src/target/breakpoints.c
@@ -549,8 +549,6 @@ int watchpoint_hit(struct target *target, enum watchpoint_rw *rw,
int retval;
struct watchpoint *hit_watchpoint;
- LOG_DEBUG("[%d]", target->coreid);
-
retval = target_hit_watchpoint(target, &hit_watchpoint);
if (retval != ERROR_OK)
return ERROR_FAIL;
diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c
index 6ba6127..01b84bf 100644
--- a/src/target/riscv/riscv.c
+++ b/src/target/riscv/riscv.c
@@ -648,33 +648,12 @@ static void trigger_from_watchpoint(struct trigger *trigger,
int riscv_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
{
- LOG_DEBUG("[%d] @0x%" TARGET_PRIxADDR, target->coreid, watchpoint->address);
struct trigger trigger;
trigger_from_watchpoint(&trigger, watchpoint);
- if (target->smp) {
- struct target *failed = NULL;
- for (struct target_list *list = target->head; list != NULL;
- list = list->next) {
- struct target *t = list->target;
- if (add_trigger(t, &trigger) != ERROR_OK) {
- failed = t;
- break;
- }
- }
- if (failed) {
- for (struct target_list *list = target->head;
- list->target != failed; list = list->next) {
- struct target *t = list->target;
- remove_trigger(t, &trigger);
- }
- return ERROR_FAIL;
- }
- } else {
- int result = add_trigger(target, &trigger);
- if (result != ERROR_OK)
- return result;
- }
+ int result = add_trigger(target, &trigger);
+ if (result != ERROR_OK)
+ return result;
watchpoint->set = true;
return ERROR_OK;
@@ -688,21 +667,9 @@ int riscv_remove_watchpoint(struct target *target,
struct trigger trigger;
trigger_from_watchpoint(&trigger, watchpoint);
- if (target->smp) {
- bool failed = false;
- for (struct target_list *list = target->head; list != NULL;
- list = list->next) {
- struct target *t = list->target;
- if (remove_trigger(t, &trigger) != ERROR_OK)
- failed = true;
- }
- if (failed)
- return ERROR_FAIL;
- } else {
- int result = remove_trigger(target, &trigger);
- if (result != ERROR_OK)
- return result;
- }
+ int result = remove_trigger(target, &trigger);
+ if (result != ERROR_OK)
+ return result;
watchpoint->set = false;
return ERROR_OK;
diff --git a/src/target/target.c b/src/target/target.c
index 8b94fc9..ffd82fb 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -1206,8 +1206,6 @@ int target_hit_watchpoint(struct target *target,
return ERROR_FAIL;
}
- LOG_DEBUG("[%d]", target->coreid);
-
return target->type->hit_watchpoint(target, hit_watchpoint);
}