Fixed bug on entry that caused first step to trigger two stops at start.
This commit is contained in:
parent
1211a67191
commit
936b047b12
|
@ -330,7 +330,8 @@ void CpuThread()
|
||||||
if(_CoreParameter.iGDBPort > 0)
|
if(_CoreParameter.iGDBPort > 0)
|
||||||
{
|
{
|
||||||
gdb_init(_CoreParameter.iGDBPort);
|
gdb_init(_CoreParameter.iGDBPort);
|
||||||
gdb_handle_exception();
|
// break at next instruction (the first instruction)
|
||||||
|
gdb_break();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -633,18 +633,23 @@ static void gdb_write_mem()
|
||||||
gdb_reply("OK");
|
gdb_reply("OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gdb_step()
|
// forces a break on next instruction check
|
||||||
|
void gdb_break()
|
||||||
{
|
{
|
||||||
step_break = 1;
|
step_break = 1;
|
||||||
send_signal = 1;
|
send_signal = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gdb_step()
|
||||||
|
{
|
||||||
|
gdb_break();
|
||||||
|
}
|
||||||
|
|
||||||
static void gdb_continue()
|
static void gdb_continue()
|
||||||
{
|
{
|
||||||
send_signal = 1;
|
send_signal = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool gdb_add_bp(u32 type, u32 addr, u32 len)
|
bool gdb_add_bp(u32 type, u32 addr, u32 len)
|
||||||
{
|
{
|
||||||
gdb_bp_t *bp;
|
gdb_bp_t *bp;
|
||||||
|
|
|
@ -44,6 +44,7 @@ typedef enum {
|
||||||
void gdb_init(u32 port);
|
void gdb_init(u32 port);
|
||||||
void gdb_deinit();
|
void gdb_deinit();
|
||||||
bool gdb_active();
|
bool gdb_active();
|
||||||
|
void gdb_break();
|
||||||
|
|
||||||
void gdb_handle_exception();
|
void gdb_handle_exception();
|
||||||
int gdb_signal(u32 signal);
|
int gdb_signal(u32 signal);
|
||||||
|
|
Loading…
Reference in New Issue