aboutsummaryrefslogtreecommitdiff
path: root/src/rtos
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2019-01-25 14:34:01 -0800
committerTim Newsome <tim@sifive.com>2019-01-25 14:48:22 -0800
commit96df1db7b17b5a2298150f21c1c1bee00ffbe0f9 (patch)
tree21674fd61b6d3a25d35c426bd2d826949071ec2d /src/rtos
parent49dd7ded87052fcdd819392b84e59ee6c64e0950 (diff)
downloadriscv-openocd-96df1db7b17b5a2298150f21c1c1bee00ffbe0f9.zip
riscv-openocd-96df1db7b17b5a2298150f21c1c1bee00ffbe0f9.tar.gz
riscv-openocd-96df1db7b17b5a2298150f21c1c1bee00ffbe0f9.tar.bz2
Remove debug statements.
Change-Id: If37bc883fea0b83740bfd6a7fcb2091db0ac61f0
Diffstat (limited to 'src/rtos')
-rw-r--r--src/rtos/hwthread.c30
-rw-r--r--src/rtos/rtos.c1
-rw-r--r--src/rtos/rtos.h3
3 files changed, 3 insertions, 31 deletions
diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c
index caa3f72..cb8fb20 100644
--- a/src/rtos/hwthread.c
+++ b/src/rtos/hwthread.c
@@ -37,7 +37,7 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
struct rtos_reg **reg_list, int *num_regs);
static int hwthread_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]);
static int hwthread_smp_init(struct target *target);
-int hwthread_set_reg(struct rtos *rtos, int reg_num, uint8_t *reg_value);
+int hwthread_set_reg(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value);
#define HW_THREAD_NAME_STR_SIZE (32)
@@ -91,9 +91,6 @@ static int hwthread_update_threads(struct rtos *rtos)
int64_t current_thread = 0;
enum target_debug_reason current_reason = DBG_REASON_UNDEFINED;
- LOG_DEBUG("current_thread=%i", (int)rtos->current_thread);
- LOG_DEBUG("current_threadid=%i", (int)rtos->current_threadid);
-
if (rtos == NULL)
return ERROR_FAIL;
@@ -112,22 +109,6 @@ static int hwthread_update_threads(struct rtos *rtos)
} else
thread_list_size = 1;
-#if 0
- if (thread_list_size == rtos->thread_count) {
- /* Nothing changed. Exit early.
- * This is important because if we do recreate the data, we potentially
- * change what the current thread is, which can lead to trouble because
- * this function is sometimes called when single stepping
- * (gdb_handle_vcont_packet), and the current thread should not be
- * changed as part of that. */
- /* TODO: Do we need to confirm that all the "threads" are really the
- * same? Is it even possible to change the number of configured
- * targets and SMP groups after this function is called the first time?
- */
- return ERROR_OK;
- }
-#endif
-
/* Wipe out previous thread details if any, but preserve threadid. */
int64_t current_threadid = rtos->current_threadid;
rtos_free_threadlist(rtos);
@@ -201,8 +182,6 @@ static int hwthread_update_threads(struct rtos *rtos)
}
threads_found++;
- LOG_DEBUG(">>> tid=%ld, debug_reason=%d, current_thread=%ld, current_reason=%d",
- tid, curr->debug_reason, current_thread, current_reason);
}
} else {
hwthread_fill_thread(rtos, target, threads_found);
@@ -220,8 +199,6 @@ static int hwthread_update_threads(struct rtos *rtos)
else
rtos->current_thread = threadid_from_target(target);
- LOG_DEBUG("current_thread=%i", (int)rtos->current_thread);
- LOG_DEBUG("current_threadid=%i", (int)rtos->current_threadid);
return 0;
}
@@ -287,7 +264,6 @@ static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id,
static int hwthread_get_thread_reg(struct rtos *rtos, int64_t thread_id,
uint32_t reg_num, struct rtos_reg *rtos_reg)
{
- LOG_DEBUG(">>> thread %ld, reg %d", thread_id, reg_num);
if (rtos == NULL)
return ERROR_FAIL;
@@ -316,7 +292,7 @@ static int hwthread_get_thread_reg(struct rtos *rtos, int64_t thread_id,
return ERROR_OK;
}
-int hwthread_set_reg(struct rtos *rtos, int reg_num, uint8_t *reg_value)
+int hwthread_set_reg(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value)
{
if (rtos == NULL)
return ERROR_FAIL;
@@ -368,8 +344,6 @@ static int hwthread_thread_packet(struct connection *connection, const char *pac
struct target *curr = NULL;
int64_t current_threadid;
- LOG_DEBUG(">>> %s", packet);
-
if (packet[0] == 'H' && packet[1] == 'g') {
/* Never reached, because this case is handled by rtos_thread_packet(). */
sscanf(packet, "Hg%16" SCNx64, &current_threadid);
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index a5b7fdb..8b9eb4c 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -552,7 +552,6 @@ int rtos_set_reg(struct connection *connection, int reg_num,
{
struct target *target = get_target_from_connection(connection);
int64_t current_threadid = target->rtos->current_threadid;
- LOG_DEBUG(">>> thread %ld, reg %d", current_threadid, reg_num);
if ((target->rtos != NULL) &&
(target->rtos->type->set_reg != NULL) &&
(current_threadid != -1) &&
diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h
index 001837f..81829b1 100644
--- a/src/rtos/rtos.h
+++ b/src/rtos/rtos.h
@@ -82,8 +82,7 @@ struct rtos_type {
int (*get_symbol_list_to_lookup)(symbol_table_elem_t *symbol_list[]);
int (*clean)(struct target *target);
char * (*ps_command)(struct target *target);
- // TODO: int or uint32_t for reg_num?
- int (*set_reg)(struct rtos *rtos, int reg_num, uint8_t *reg_value);
+ int (*set_reg)(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value);
};
struct stack_register_offset {