This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] gdbserver: enum target_signal vs. int host_signal [Re: [patch] enum target_signal vs. int host_signal]
On Sun, 25 Jul 2010 00:44:39 +0200, Pedro Alves wrote:
> Currently, host signal.
Therefore OK to check-in?
> And win32-low.c uses TARGET_SIGNAL_0 when it shouldn't.
I haven't fixed this common kind of bug in this pre-patchset as
TARGET_SIGNAL_0 == 0 so there is no functionality bug.
> > gdb/
> > 2010-07-24 Jan Kratochvil <jan.kratochvil@redhat.com>
> >
> > * linux-nat.c (linux_nat_do_thread_registers): Convert STOP_SIGNAL to
> > the host signal first.
>
> Okay.
Checked-in:
http://sourceware.org/ml/gdb-cvs/2010-07/msg00144.html
Thanks,
Jan
gdb/gdbserver/
2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* server.c (handle_target_event): Use target_signal_to_host for
resume_info.sig initialization.
* target.h (struct thread_resume) <sig>: New comment.
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -3147,7 +3147,7 @@ handle_target_event (int err, gdb_client_data client_data)
resume_info.thread = last_ptid;
resume_info.kind = resume_continue;
- resume_info.sig = last_status.value.sig;
+ resume_info.sig = target_signal_to_host (last_status.value.sig);
(*the_target->resume) (&resume_info, 1);
}
else if (debug_threads)
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -53,7 +53,8 @@ struct thread_resume
/* If non-zero, send this signal when we resume, or to stop the
thread. If stopping a thread, and this is 0, the target should
stop the thread however it best decides to (e.g., SIGSTOP on
- linux; SuspendThread on win32). */
+ linux; SuspendThread on win32). This is a host signal value (not
+ enum target_signal). */
int sig;
};