From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18639 invoked by alias); 14 Oct 2009 21:05:03 -0000 Received: (qmail 18554 invoked by uid 22791); 14 Oct 2009 21:05:01 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Oct 2009 21:04:55 +0000 Received: (qmail 1416 invoked from network); 14 Oct 2009 21:04:53 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Oct 2009 21:04:53 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: gdb displaying incorrect signal names with remote target ? Date: Wed, 14 Oct 2009 21:37:00 -0000 User-Agent: KMail/1.9.10 Cc: Julian Smith , gdb@sources.redhat.com References: <20091014214827.7259ea9e.jsmith@undo-software.com> In-Reply-To: <20091014214827.7259ea9e.jsmith@undo-software.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910142204.58063.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00262.txt.bz2 On Wednesday 14 October 2009 21:48:27, Julian Smith wrote: > The inferior is receiving SIGUSR1 (signal number 10 on my i386 Linux > system), thus the remote target sends a packet `S0a' to gdb. There's the problem. The remote target needs to send the remote protocol code for SIGUSR1 , not the targets'. That would be... TARGET_SIGNAL_USR1 = 30. The manual describes this: "In the below the exact meaning of @dfn{signal number} is defined by the header @file{include/gdb/signals.h} in the @value{GDBN} source code." ... and include/gdb/signals.h says: /* The numbering of these signals is chosen to match traditional unix signals (insofar as various unices use the same numbers, anyway). It is also the numbering of the GDB remote protocol. Other remote protocols, if they use a different numbering, should make sure to translate appropriately. -- Pedro Alves From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18308 invoked by alias); 14 Oct 2009 21:05:01 -0000 Received: (qmail 18286 invoked by uid 22791); 14 Oct 2009 21:05:00 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Oct 2009 21:04:55 +0000 Received: (qmail 1416 invoked from network); 14 Oct 2009 21:04:53 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Oct 2009 21:04:53 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: gdb displaying incorrect signal names with remote target ? Date: Wed, 14 Oct 2009 21:05:00 -0000 User-Agent: KMail/1.9.10 Cc: Julian Smith , gdb@sources.redhat.com References: <20091014214827.7259ea9e.jsmith@undo-software.com> In-Reply-To: <20091014214827.7259ea9e.jsmith@undo-software.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200910142204.58063.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00261.txt.bz2 Message-ID: <20091014210500.BX9nE2GRU3zURf5UaJsLVPs57QiqT6XfLKL9Pxop13Q@z> On Wednesday 14 October 2009 21:48:27, Julian Smith wrote: > The inferior is receiving SIGUSR1 (signal number 10 on my i386 Linux > system), thus the remote target sends a packet `S0a' to gdb. There's the problem. The remote target needs to send the remote protocol code for SIGUSR1 , not the targets'. That would be... TARGET_SIGNAL_USR1 = 30. The manual describes this: "In the below the exact meaning of @dfn{signal number} is defined by the header @file{include/gdb/signals.h} in the @value{GDBN} source code." ... and include/gdb/signals.h says: /* The numbering of these signals is chosen to match traditional unix signals (insofar as various unices use the same numbers, anyway). It is also the numbering of the GDB remote protocol. Other remote protocols, if they use a different numbering, should make sure to translate appropriately. -- Pedro Alves