- don't optimize away gdb

- GCC 4.92
- cleaned up



git-svn-id: http://moon:8086/svn/mips@107 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-19 20:56:21 +00:00
parent 0e6994cdc6
commit e1ea7e3582
4 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
extern uart_if_t uart_if[];
extern void handle_exception (unsigned long *registers);
int gdb_stub(struct xcptcontext * xcp) __attribute__ ((section (".gdb")));
extern int gdb_stub(struct xcptcontext * xcp) __attribute__ ((section (".gdb"))) __attribute__ ((used));
int gdb_stub(struct xcptcontext * xcp)
{
handle_exception((unsigned long *)xcp);
+2 -4
View File
@@ -41,13 +41,11 @@ const con_if_t con_if =
con_if_entry, ARRAYSIZE(con_if_entry)
};
static uart_if_t const *dbg_uart = NULL;
void dbg_uart_isr(struct xcptcontext *xcp)
{
if(SYS_UART_BIT_RX_AVAIL & *dbg_uart->pCTRL)
if(SYS_UART_BIT_RX_AVAIL & *uart_if[UART_DEBUGGER].pCTRL)
{
char c = *dbg_uart->pDATA;
char c = *uart_if[UART_DEBUGGER].pDATA;
if (c == 3)
{
dbg_func(xcp);
+2 -4
View File
@@ -41,13 +41,11 @@ const con_if_t con_if =
con_if_entry, ARRAYSIZE(con_if_entry)
};
static uart_if_t const *dbg_uart = NULL;
void dbg_uart_isr(struct xcptcontext *xcp)
{
if(SYS_UART_BIT_RX_AVAIL & *dbg_uart->pCTRL)
if(SYS_UART_BIT_RX_AVAIL & *uart_if[UART_DEBUGGER].pCTRL)
{
char c = *dbg_uart->pDATA;
char c = *uart_if[UART_DEBUGGER].pDATA;
if (c == 3)
{
dbg_func(xcp);
+2 -2
View File
@@ -424,10 +424,10 @@ handle_exception (unsigned long *registers)
char *ptr;
unsigned long *sp;
unsigned long *pAddr = (unsigned long *)registers[PC];
addr = *((unsigned long *)registers[PC]);
// is break
if (isBreak(*pAddr))
if (isBreak(addr))
{
registers[PC] += 4;
}