aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-06-17 04:01:05 +0000
committerDaniel Jacobowitz <drow@false.org>2005-06-17 04:01:05 +0000
commitd592fa2f7f5a88b52b22c29bb5dd0ce9c49d998d (patch)
tree821a7d905c8c661d8d21e1e04fffcf38f57abdaa /gdb/gdbserver
parent39be55309b04fbf93010c338750d95bb900a9f11 (diff)
downloadgdb-d592fa2f7f5a88b52b22c29bb5dd0ce9c49d998d.zip
gdb-d592fa2f7f5a88b52b22c29bb5dd0ce9c49d998d.tar.gz
gdb-d592fa2f7f5a88b52b22c29bb5dd0ce9c49d998d.tar.bz2
* linux-low.c (linux_wait, linux_send_signal): Don't test
an unsigned long variable for > 0 if it could be MAX_ULONG. * server.c (myresume): Likewise. * target.c (set_desired_inferior): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/linux-low.c4
-rw-r--r--gdb/gdbserver/server.c4
-rw-r--r--gdb/gdbserver/target.c3
4 files changed, 13 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index d588221..4c3e0fe 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * linux-low.c (linux_wait, linux_send_signal): Don't test
+ an unsigned long variable for > 0 if it could be MAX_ULONG.
+ * server.c (myresume): Likewise.
+ * target.c (set_desired_inferior): Likewise.
+
2005-06-13 Mark Kettenis <kettenis@gnu.org>
* configure.ac: Simplify and improve check for socklen_t.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 9e94add..fbc3033 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -667,7 +667,7 @@ retry:
then we need to make sure we restart the other threads. We could
pick a thread at random or restart all; restarting all is less
arbitrary. */
- if (cont_thread > 0)
+ if (cont_thread != 0 && cont_thread != -1)
{
child = (struct thread_info *) find_inferior_id (&all_threads,
cont_thread);
@@ -1435,7 +1435,7 @@ linux_send_signal (int signum)
{
extern unsigned long signal_pid;
- if (cont_thread > 0)
+ if (cont_thread != 0 && cont_thread != -1)
{
struct process_info *process;
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 55f7c21..b5295bb 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -281,7 +281,7 @@ myresume (int step, int sig)
struct thread_resume resume_info[2];
int n = 0;
- if (step || sig || cont_thread > 0)
+ if (step || sig || (cont_thread != 0 && cont_thread != -1))
{
resume_info[0].thread
= ((struct inferior_list_entry *) current_inferior)->id;
@@ -293,7 +293,7 @@ myresume (int step, int sig)
resume_info[n].thread = -1;
resume_info[n].step = 0;
resume_info[n].sig = 0;
- resume_info[n].leave_stopped = (cont_thread > 0);
+ resume_info[n].leave_stopped = (cont_thread != 0 && cont_thread != -1);
(*the_target->resume) (resume_info);
}
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c
index 0de69e8..b9222e2 100644
--- a/gdb/gdbserver/target.c
+++ b/gdb/gdbserver/target.c
@@ -42,7 +42,8 @@ set_desired_inferior (int use_general)
/* If we are continuing any (all) thread(s), use step_thread
to decide which thread to step and/or send the specified
signal to. */
- if (step_thread > 0 && (cont_thread == 0 || cont_thread == -1))
+ if ((step_thread != 0 && step_thread != -1)
+ && (cont_thread == 0 || cont_thread == -1))
found = (struct thread_info *) find_inferior_id (&all_threads,
step_thread);