From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30364 invoked by alias); 25 Jul 2010 09:33:56 -0000 Received: (qmail 30355 invoked by uid 22791); 25 Jul 2010 09:33:55 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Jul 2010 09:33:48 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6P9XcnO026256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 25 Jul 2010 05:33:38 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6P9XagO031403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Jul 2010 05:33:38 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o6P9XZRY026993; Sun, 25 Jul 2010 11:33:35 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o6P9XYhU026992; Sun, 25 Jul 2010 11:33:34 +0200 Date: Sun, 25 Jul 2010 09:33:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: [patch] gdbserver: enum target_signal vs. int host_signal [Re: [patch] enum target_signal vs. int host_signal] Message-ID: <20100725093334.GA25366@host1.dyn.jankratochvil.net> References: <20100724114208.GA8491@host1.dyn.jankratochvil.net> <201007242344.39745.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007242344.39745.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00383.txt.bz2 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 > > > > * 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 * server.c (handle_target_event): Use target_signal_to_host for resume_info.sig initialization. * target.h (struct thread_resume) : 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; };