mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
Better handling of gdb CTRL-C during debug output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@199 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7fa8c949ad
commit
350629929d
1 changed files with 9 additions and 6 deletions
|
@ -63,10 +63,6 @@ static char debug_rx_char(void)
|
||||||
char ch;
|
char ch;
|
||||||
char ssr;
|
char ssr;
|
||||||
|
|
||||||
/* Special debug hack. Shut off the IRQ while polling, to prevent the debug
|
|
||||||
stub from catching the IRQ */
|
|
||||||
SCR1 &= ~0x40;
|
|
||||||
|
|
||||||
while (!debug_rx_ready())
|
while (!debug_rx_ready())
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
@ -80,8 +76,6 @@ static char debug_rx_char(void)
|
||||||
if (ssr)
|
if (ssr)
|
||||||
debug_handle_error (ssr);
|
debug_handle_error (ssr);
|
||||||
|
|
||||||
/* Special debug hack. Enable the IRQ again */
|
|
||||||
SCR1 |= 0x40;
|
|
||||||
return ch;
|
return ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,8 +94,14 @@ static char lowhex(int x)
|
||||||
static void putpacket (char *buffer)
|
static void putpacket (char *buffer)
|
||||||
{
|
{
|
||||||
register int checksum;
|
register int checksum;
|
||||||
|
char ch;
|
||||||
|
|
||||||
char *src = buffer;
|
char *src = buffer;
|
||||||
|
|
||||||
|
/* Special debug hack. Shut off the Rx IRQ during I/O to prevent the debug
|
||||||
|
stub from interrupting the message */
|
||||||
|
SCR1 &= ~0x40;
|
||||||
|
|
||||||
debug_tx_char ('$');
|
debug_tx_char ('$');
|
||||||
checksum = 0;
|
checksum = 0;
|
||||||
|
|
||||||
|
@ -144,6 +144,9 @@ static void putpacket (char *buffer)
|
||||||
|
|
||||||
/* Wait for the '+' */
|
/* Wait for the '+' */
|
||||||
debug_rx_char();
|
debug_rx_char();
|
||||||
|
|
||||||
|
/* Special debug hack. Enable the IRQ again */
|
||||||
|
SCR1 |= 0x40;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* convert the memory, pointed to by mem into hex, placing result in buf */
|
/* convert the memory, pointed to by mem into hex, placing result in buf */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue