aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-05-24 16:51:47 +0000
committerPedro Alves <palves@redhat.com>2012-05-24 16:51:47 +0000
commita493e3e2e429e4832b8620bd920ad07d0c2892d7 (patch)
tree4055e5c50cce1e1b622345a311c16a1441951778 /gdb/gdbserver
parent2ea286498fd2ddceaf074bfbc9a2986777ea0396 (diff)
downloadgdb-a493e3e2e429e4832b8620bd920ad07d0c2892d7.zip
gdb-a493e3e2e429e4832b8620bd920ad07d0c2892d7.tar.gz
gdb-a493e3e2e429e4832b8620bd920ad07d0c2892d7.tar.bz2
gdb/
2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. include/gdb/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/arm/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/avr/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/common/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/cr16/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/d10v/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/erc32/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/m32c/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/ppc/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rl78/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rx/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-low.c12
-rw-r--r--gdb/gdbserver/lynx-low.c2
-rw-r--r--gdb/gdbserver/nto-low.c6
-rw-r--r--gdb/gdbserver/server.c24
-rw-r--r--gdb/gdbserver/spu-low.c2
-rw-r--r--gdb/gdbserver/win32-low.c54
7 files changed, 56 insertions, 50 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index ed146eb..22e00e2 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -2,6 +2,12 @@
PR gdb/7205
+ Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
+
+2012-05-24 Pedro Alves <palves@redhat.com>
+
+ PR gdb/7205
+
Replace target_signal with gdb_signal throughout.
2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index e3c6ed6..e1ea64a 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1062,7 +1062,7 @@ linux_kill (int pid)
static int
get_detach_signal (struct thread_info *thread)
{
- enum gdb_signal signo = TARGET_SIGNAL_0;
+ enum gdb_signal signo = GDB_SIGNAL_0;
int status;
struct lwp_info *lp = get_thread_lwp (thread);
@@ -1074,7 +1074,7 @@ get_detach_signal (struct thread_info *thread)
cleanly, then it'll have stopped with SIGSTOP. But we don't
want to deliver that SIGSTOP. */
if (thread->last_status.kind != TARGET_WAITKIND_STOPPED
- || thread->last_status.value.sig == TARGET_SIGNAL_0)
+ || thread->last_status.value.sig == GDB_SIGNAL_0)
return 0;
/* Otherwise, we may need to deliver the signal we
@@ -1117,7 +1117,7 @@ get_detach_signal (struct thread_info *thread)
/* If we have no way to know which signals GDB does not
want to have passed to the program, assume
SIGTRAP/SIGINT, which is GDB's default. */
- && (signo == TARGET_SIGNAL_TRAP || signo == TARGET_SIGNAL_INT))
+ && (signo == GDB_SIGNAL_TRAP || signo == GDB_SIGNAL_INT))
{
if (debug_threads)
fprintf (stderr,
@@ -2262,7 +2262,7 @@ linux_stabilize_threads (void)
/* Lock it. */
lwp->suspended++;
- if (ourstatus.value.sig != TARGET_SIGNAL_0
+ if (ourstatus.value.sig != GDB_SIGNAL_0
|| current_inferior->last_resume_kind == resume_stop)
{
wstat = W_STOPCODE (gdb_signal_to_host (ourstatus.value.sig));
@@ -2558,7 +2558,7 @@ Check if we're already there.\n",
if (stabilizing_threads)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
return ptid_of (event_child);
}
}
@@ -2731,7 +2731,7 @@ Check if we're already there.\n",
/* A thread that has been requested to stop by GDB with vCont;t,
and it stopped cleanly, so report as SIG0. The use of
SIGSTOP is an implementation detail. */
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
}
else if (current_inferior->last_resume_kind == resume_stop
&& WSTOPSIG (w) != SIGSTOP)
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c
index 2c6ed14..2c7ab6e 100644
--- a/gdb/gdbserver/lynx-low.c
+++ b/gdb/gdbserver/lynx-low.c
@@ -481,7 +481,7 @@ retry:
breakpoint events (Eg. new-thread events). Handle those other types
of events, and resume the execution if necessary. */
if (status->kind == TARGET_WAITKIND_STOPPED
- && status->value.integer == TARGET_SIGNAL_TRAP)
+ && status->value.integer == GDB_SIGNAL_TRAP)
{
const int realsig = lynx_ptrace (PTRACE_GETTRACESIG, new_ptid, 0, 0, 0);
diff --git a/gdb/gdbserver/nto-low.c b/gdb/gdbserver/nto-low.c
index 22cd612..73618cd 100644
--- a/gdb/gdbserver/nto-low.c
+++ b/gdb/gdbserver/nto-low.c
@@ -532,14 +532,14 @@ nto_wait (ptid_t ptid,
{
TRACE ("SSTEP\n");
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
/* Was it a breakpoint? */
else if (status.flags & trace_mask)
{
TRACE ("STOPPED\n");
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
}
else if (status.flags & _DEBUG_FLAG_ISTOP)
{
@@ -595,7 +595,7 @@ nto_wait (ptid_t ptid,
TRACE ("REQUESTED\n");
/* We are assuming a requested stop is due to a SIGINT. */
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
nto_inferior.exit_signo = 0;
break;
}
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 9b8107e..30bb3c3 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -71,8 +71,8 @@ int debug_threads;
/* Enable debugging of h/w breakpoint/watchpoint support. */
int debug_hw_points;
-int pass_signals[TARGET_SIGNAL_LAST];
-int program_signals[TARGET_SIGNAL_LAST];
+int pass_signals[GDB_SIGNAL_LAST];
+int program_signals[GDB_SIGNAL_LAST];
int program_signals_p;
jmp_buf toplevel;
@@ -320,7 +320,7 @@ start_inferior (char **argv)
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
}
- while (last_status.value.sig != TARGET_SIGNAL_TRAP);
+ while (last_status.value.sig != GDB_SIGNAL_TRAP);
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
@@ -370,8 +370,8 @@ attach_inferior (int pid)
process using the "attach" command, but this is different; it's
just using "target remote". Pretend it's just starting up. */
if (last_status.kind == TARGET_WAITKIND_STOPPED
- && last_status.value.sig == TARGET_SIGNAL_STOP)
- last_status.value.sig = TARGET_SIGNAL_TRAP;
+ && last_status.value.sig == GDB_SIGNAL_STOP)
+ last_status.value.sig = GDB_SIGNAL_TRAP;
current_inferior->last_resume_kind = resume_stop;
current_inferior->last_status = last_status;
@@ -451,7 +451,7 @@ handle_general_set (char *own_buf)
{
if (strncmp ("QPassSignals:", own_buf, strlen ("QPassSignals:")) == 0)
{
- int numsigs = (int) TARGET_SIGNAL_LAST, i;
+ int numsigs = (int) GDB_SIGNAL_LAST, i;
const char *p = own_buf + strlen ("QPassSignals:");
CORE_ADDR cursig;
@@ -476,7 +476,7 @@ handle_general_set (char *own_buf)
if (strncmp ("QProgramSignals:", own_buf, strlen ("QProgramSignals:")) == 0)
{
- int numsigs = (int) TARGET_SIGNAL_LAST, i;
+ int numsigs = (int) GDB_SIGNAL_LAST, i;
const char *p = own_buf + strlen ("QProgramSignals:");
CORE_ADDR cursig;
@@ -2158,7 +2158,7 @@ handle_v_kill (char *own_buf)
if (pid != 0 && kill_inferior (pid) == 0)
{
last_status.kind = TARGET_WAITKIND_SIGNALLED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
last_ptid = pid_to_ptid (pid);
discard_queued_stop_replies (pid);
write_ok (own_buf);
@@ -2381,7 +2381,7 @@ gdb_wants_thread_stopped (struct inferior_list_entry *entry)
/* Most threads are stopped implicitly (all-stop); tag that with
signal 0. */
thread->last_status.kind = TARGET_WAITKIND_STOPPED;
- thread->last_status.value.sig = TARGET_SIGNAL_0;
+ thread->last_status.value.sig = GDB_SIGNAL_0;
}
}
@@ -2436,7 +2436,7 @@ handle_status (char *own_buf)
struct target_waitstatus status;
status.kind = TARGET_WAITKIND_STOPPED;
- status.value.sig = TARGET_SIGNAL_TRAP;
+ status.value.sig = GDB_SIGNAL_TRAP;
prepare_resume_reply (own_buf,
all_threads.head->id, &status);
}
@@ -3308,7 +3308,7 @@ process_serial_event (void)
if (extended_protocol)
{
last_status.kind = TARGET_WAITKIND_EXITED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
return 0;
}
else
@@ -3352,7 +3352,7 @@ process_serial_event (void)
else
{
last_status.kind = TARGET_WAITKIND_EXITED;
- last_status.value.sig = TARGET_SIGNAL_KILL;
+ last_status.value.sig = GDB_SIGNAL_KILL;
}
return 0;
}
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index f3a5645..d7283a9 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -465,7 +465,7 @@ spu_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int options)
if (!server_waiting)
{
ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = TARGET_SIGNAL_0;
+ ourstatus->value.sig = GDB_SIGNAL_0;
return ptid_build (ret, ret, 0);
}
diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c
index 86e7e35..4d5fe67 100644
--- a/gdb/gdbserver/win32-low.c
+++ b/gdb/gdbserver/win32-low.c
@@ -74,7 +74,7 @@ static int attaching = 0;
static HANDLE current_process_handle = NULL;
static DWORD current_process_id = 0;
static DWORD main_thread_id = 0;
-static enum gdb_signal last_sig = TARGET_SIGNAL_0;
+static enum gdb_signal last_sig = GDB_SIGNAL_0;
/* The current debug event from WaitForDebugEvent. */
static DEBUG_EVENT current_event;
@@ -308,7 +308,7 @@ child_init_thread_list (void)
static void
do_initial_child_stuff (HANDLE proch, DWORD pid, int attached)
{
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
current_process_handle = proch;
current_process_id = pid;
@@ -835,7 +835,7 @@ win32_resume (struct thread_resume *resume_info, size_t n)
step = 0;
}
- if (sig != TARGET_SIGNAL_0)
+ if (sig != GDB_SIGNAL_0)
{
if (current_event.dwDebugEventCode != EXCEPTION_DEBUG_EVENT)
{
@@ -847,7 +847,7 @@ win32_resume (struct thread_resume *resume_info, size_t n)
OUTMSG (("Can only continue with recieved signal %d.\n", last_sig));
}
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
/* Get context for the currently selected thread. */
ptid = debug_event_ptid (&current_event);
@@ -1232,55 +1232,55 @@ handle_exception (struct target_waitstatus *ourstatus)
{
case EXCEPTION_ACCESS_VIOLATION:
OUTMSG2 (("EXCEPTION_ACCESS_VIOLATION"));
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
break;
case STATUS_STACK_OVERFLOW:
OUTMSG2 (("STATUS_STACK_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_SEGV;
+ ourstatus->value.sig = GDB_SIGNAL_SEGV;
break;
case STATUS_FLOAT_DENORMAL_OPERAND:
OUTMSG2 (("STATUS_FLOAT_DENORMAL_OPERAND"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
OUTMSG2 (("EXCEPTION_ARRAY_BOUNDS_EXCEEDED"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INEXACT_RESULT:
OUTMSG2 (("STATUS_FLOAT_INEXACT_RESULT"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_INVALID_OPERATION:
OUTMSG2 (("STATUS_FLOAT_INVALID_OPERATION"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_OVERFLOW:
OUTMSG2 (("STATUS_FLOAT_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_STACK_CHECK:
OUTMSG2 (("STATUS_FLOAT_STACK_CHECK"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_UNDERFLOW:
OUTMSG2 (("STATUS_FLOAT_UNDERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_FLOAT_DIVIDE_BY_ZERO:
OUTMSG2 (("STATUS_FLOAT_DIVIDE_BY_ZERO"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_DIVIDE_BY_ZERO:
OUTMSG2 (("STATUS_INTEGER_DIVIDE_BY_ZERO"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case STATUS_INTEGER_OVERFLOW:
OUTMSG2 (("STATUS_INTEGER_OVERFLOW"));
- ourstatus->value.sig = TARGET_SIGNAL_FPE;
+ ourstatus->value.sig = GDB_SIGNAL_FPE;
break;
case EXCEPTION_BREAKPOINT:
OUTMSG2 (("EXCEPTION_BREAKPOINT"));
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
#ifdef _WIN32_WCE
/* Remove the initial breakpoint. */
check_breakpoints ((CORE_ADDR) (long) current_event
@@ -1289,27 +1289,27 @@ handle_exception (struct target_waitstatus *ourstatus)
break;
case DBG_CONTROL_C:
OUTMSG2 (("DBG_CONTROL_C"));
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case DBG_CONTROL_BREAK:
OUTMSG2 (("DBG_CONTROL_BREAK"));
- ourstatus->value.sig = TARGET_SIGNAL_INT;
+ ourstatus->value.sig = GDB_SIGNAL_INT;
break;
case EXCEPTION_SINGLE_STEP:
OUTMSG2 (("EXCEPTION_SINGLE_STEP"));
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case EXCEPTION_ILLEGAL_INSTRUCTION:
OUTMSG2 (("EXCEPTION_ILLEGAL_INSTRUCTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_PRIV_INSTRUCTION:
OUTMSG2 (("EXCEPTION_PRIV_INSTRUCTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
case EXCEPTION_NONCONTINUABLE_EXCEPTION:
OUTMSG2 (("EXCEPTION_NONCONTINUABLE_EXCEPTION"));
- ourstatus->value.sig = TARGET_SIGNAL_ILL;
+ ourstatus->value.sig = GDB_SIGNAL_ILL;
break;
default:
if (current_event.u.Exception.dwFirstChance)
@@ -1321,7 +1321,7 @@ handle_exception (struct target_waitstatus *ourstatus)
current_event.u.Exception.ExceptionRecord.ExceptionCode,
phex_nz ((uintptr_t) current_event.u.Exception.ExceptionRecord.
ExceptionAddress, sizeof (uintptr_t))));
- ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
+ ourstatus->value.sig = GDB_SIGNAL_UNKNOWN;
break;
}
OUTMSG2 (("\n"));
@@ -1379,7 +1379,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
{
ptid_t ptid;
- last_sig = TARGET_SIGNAL_0;
+ last_sig = GDB_SIGNAL_0;
ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
/* Check if GDB sent us an interrupt request. */
@@ -1529,7 +1529,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
handle_load_dll ();
ourstatus->kind = TARGET_WAITKIND_LOADED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case UNLOAD_DLL_DEBUG_EVENT:
@@ -1539,7 +1539,7 @@ get_child_debug_event (struct target_waitstatus *ourstatus)
(unsigned) current_event.dwThreadId));
handle_unload_dll ();
ourstatus->kind = TARGET_WAITKIND_LOADED;
- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
+ ourstatus->value.sig = GDB_SIGNAL_TRAP;
break;
case EXCEPTION_DEBUG_EVENT: