Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

Commit

Permalink
server/gdb_server.c: workaround to gdb errors
Browse files Browse the repository at this point in the history
- disable passing errors back to gdb since this risc-v
change breaks other targets.
  • Loading branch information
ilg-ul committed Oct 4, 2017
1 parent 2dd1782 commit da43038
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/server/gdb_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,8 @@ static int gdb_get_registers_packet(struct connection *connection,
reg_packet_p = reg_packet;

for (i = 0; i < reg_list_size; i++) {
#if BUILD_RISCV == 1
// [ILG] WORKAROUND
#if 0 // BUILD_RISCV == 1
if (!reg_list[i]->valid) {
retval = reg_list[i]->type->get(reg_list[i]);
if (retval != ERROR_OK) {
Expand Down Expand Up @@ -1241,7 +1242,8 @@ static int gdb_set_registers_packet(struct connection *connection,
bin_buf = malloc(DIV_ROUND_UP(reg_list[i]->size, 8));
gdb_target_to_reg(target, packet_p, chars, bin_buf);

#if BUILD_RISCV == 1
// [ILG] WORKAROUND
#if 0 // BUILD_RISCV == 1
retval = reg_list[i]->type->set(reg_list[i], bin_buf);
if (retval != ERROR_OK) {
LOG_DEBUG("Couldn't set register %s.", reg_list[i]->name);
Expand Down Expand Up @@ -1291,8 +1293,9 @@ static int gdb_get_register_packet(struct connection *connection,
return ERROR_SERVER_REMOTE_CLOSED;
}

#if BUILD_RISCV == 1
if (!reg_list[reg_num]->valid) {
// [ILG] WORKAROUND
#if 0 // BUILD_RISCV == 1
if (!reg_list[reg_num]->valid) {
retval = reg_list[reg_num]->type->get(reg_list[reg_num]);
if (retval != ERROR_OK) {
LOG_DEBUG("Couldn't get register %s.", reg_list[reg_num]->name);
Expand Down Expand Up @@ -1357,7 +1360,8 @@ static int gdb_set_register_packet(struct connection *connection,

gdb_target_to_reg(target, separator + 1, chars, bin_buf);

#if BUILD_RISCV == 1
// [ILG] WORKAROUND
#if 0 // BUILD_RISCV == 1
retval = reg_list[reg_num]->type->set(reg_list[reg_num], bin_buf);
if (retval != ERROR_OK){
LOG_DEBUG("Couldn't set register %s.", reg_list[reg_num]->name);
Expand Down

0 comments on commit da43038

Please sign in to comment.