mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
[gdb] Add support for x86_64
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user