summaryrefslogtreecommitdiffstats
path: root/src/core/gdbstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gdbstub.c')
-rw-r--r--src/core/gdbstub.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/gdbstub.c b/src/core/gdbstub.c
index 6ad52d1a6..8b57ddf56 100644
--- a/src/core/gdbstub.c
+++ b/src/core/gdbstub.c
@@ -40,7 +40,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
enum {
POSIX_EINVAL = 0x1c, /* used to report bad arguments to GDB */
- SIZEOF_PAYLOAD = 256, /* buffer size of GDB payload data */
+ SIZEOF_PAYLOAD = 512, /* buffer size of GDB payload data */
};
struct gdbstub {
@@ -255,17 +255,20 @@ static void gdbstub_continue ( struct gdbstub *stub, int single_step ) {
static void gdbstub_breakpoint ( struct gdbstub *stub ) {
unsigned long args [ 3 ];
int enable = stub->payload [ 0 ] == 'Z' ? 1 : 0;
+ int rc;
+
if ( !gdbstub_get_packet_args ( stub, args, sizeof args / sizeof args [ 0 ], NULL ) ) {
gdbstub_send_errno ( stub, POSIX_EINVAL );
return;
}
- if ( gdbmach_set_breakpoint ( args [ 0 ], args [ 1 ], args [ 2 ], enable ) ) {
- gdbstub_send_ok ( stub );
- } else {
+ if ( ( rc = gdbmach_set_breakpoint ( args [ 0 ], args [ 1 ],
+ args [ 2 ], enable ) ) != 0 ) {
/* Not supported */
stub->len = 0;
gdbstub_tx_packet ( stub );
+ return;
}
+ gdbstub_send_ok ( stub );
}
static void gdbstub_rx_packet ( struct gdbstub *stub ) {