Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
typedef struct opti5x7_t {
|
typedef struct opti5x7_t {
|
||||||
uint8_t idx;
|
uint8_t idx;
|
||||||
uint8_t is_pci;
|
uint8_t is_pci;
|
||||||
uint8_t regs[16];
|
uint8_t regs[18];
|
||||||
} opti5x7_t;
|
} opti5x7_t;
|
||||||
|
|
||||||
#ifdef ENABLE_OPTI5X7_LOG
|
#ifdef ENABLE_OPTI5X7_LOG
|
||||||
@@ -158,7 +158,7 @@ opti5x7_read(uint16_t addr, void *priv)
|
|||||||
{
|
{
|
||||||
const opti5x7_t *dev = (opti5x7_t *) priv;
|
const opti5x7_t *dev = (opti5x7_t *) priv;
|
||||||
|
|
||||||
return (addr == 0x24) ? dev->regs[dev->idx] : 0xff;
|
return ((addr == 0x24) && (dev->idx < sizeof(dev->regs))) ? dev->regs[dev->idx] : 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -1513,6 +1513,7 @@ gdbstub_client_thread(void *priv)
|
|||||||
case '$': /* packet start */
|
case '$': /* packet start */
|
||||||
/* Wait for any existing packets to be processed. */
|
/* Wait for any existing packets to be processed. */
|
||||||
thread_wait_event(client->processed_event, -1);
|
thread_wait_event(client->processed_event, -1);
|
||||||
|
thread_set_event(client->processed_event);
|
||||||
|
|
||||||
client->packet_pos = 0;
|
client->packet_pos = 0;
|
||||||
break;
|
break;
|
||||||
@@ -1530,6 +1531,7 @@ gdbstub_client_thread(void *priv)
|
|||||||
case 0x03: /* break */
|
case 0x03: /* break */
|
||||||
/* Wait for any existing packets to be processed. */
|
/* Wait for any existing packets to be processed. */
|
||||||
thread_wait_event(client->processed_event, -1);
|
thread_wait_event(client->processed_event, -1);
|
||||||
|
thread_set_event(client->processed_event);
|
||||||
|
|
||||||
/* Break immediately. */
|
/* Break immediately. */
|
||||||
gdbstub_log("GDB Stub: Break requested\n");
|
gdbstub_log("GDB Stub: Break requested\n");
|
||||||
@@ -1539,6 +1541,7 @@ gdbstub_client_thread(void *priv)
|
|||||||
default:
|
default:
|
||||||
/* Wait for any existing packets to be processed, just in case. */
|
/* Wait for any existing packets to be processed, just in case. */
|
||||||
thread_wait_event(client->processed_event, -1);
|
thread_wait_event(client->processed_event, -1);
|
||||||
|
thread_set_event(client->processed_event);
|
||||||
|
|
||||||
if (client->packet_pos < (sizeof(client->packet) - 1)) {
|
if (client->packet_pos < (sizeof(client->packet) - 1)) {
|
||||||
/* Append byte to the packet. */
|
/* Append byte to the packet. */
|
||||||
|
Reference in New Issue
Block a user