From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5255 invoked by alias); 15 Apr 2006 18:25:13 -0000 Received: (qmail 5244 invoked by uid 22791); 15 Apr 2006 18:25:12 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 15 Apr 2006 18:25:10 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-206-74.inter.net.il [83.130.206.74]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DDJ62571 (AUTH halo1); Sat, 15 Apr 2006 21:25:04 +0300 (IDT) Date: Sat, 15 Apr 2006 18:25:00 -0000 Message-Id: From: Eli Zaretskii To: Masaki MURANAKA CC: gdb-patches@sourceware.org In-reply-to: <44354465-FF5A-4042-B0C3-10E4823D17E3@monami-software.com> (message from Masaki MURANAKA on Sun, 16 Apr 2006 01:36:44 +0900) Subject: Re: Signal definitions for host=mingw32/target=*-*-* Reply-to: Eli Zaretskii References: <44354465-FF5A-4042-B0C3-10E4823D17E3@monami-software.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00201.txt.bz2 > From: Masaki MURANAKA > Date: Sun, 16 Apr 2006 01:36:44 +0900 > > This is a patch that enables to build cross debuggers > on MinGW. > The base version of this patch is gdb-6.4. > > I've built m32r-elf-gdb with it and checked to work. Thanks. > ---- > 2006-04-16 Masaki MURANAKA > > * sim-signal.c: On MinGW, Added some signal definitions. > They are not defined in Win32's signal.h. > * remote-sim.c: Same above. > ---- > > Index: sim/common/sim-signal.c > =================================================================== > RCS file: /home/cvs/pizzafactory/gdb/sim/common/sim-signal.c,v > retrieving revision 1.3 > diff -r1.3 sim-signal.c > 30c30 > < #ifdef _MSC_VER > --- > > #if defined(_MSC_VER) || defined(__MINGW32__) > Index: gdb/remote-sim.c > =================================================================== > RCS file: /home/cvs/pizzafactory/gdb/gdb/remote-sim.c,v > retrieving revision 1.4 > diff -r1.4 remote-sim.c > 46a47,58 > > #if defined(_MSC_VER) || defined(__MINGW32__) > > #ifndef SIGTRAP > > #define SIGTRAP 5 > > #endif > > #ifndef SIGBUS > > #define SIGBUS 10 > > #endif > > #ifndef SIGQUIT > > #define SIGQUIT 3 > > #endif > > #endif Sorry, this is not the way to fix such problems. You cannot add arbitrary signals to a runtime that doesn't support them. The right way to fix such problems is to ifdef out the code that uses these signals. For example: #ifdef SIGTRAP ... code that uses SIGTRAP ... #endif (Yes, I know that sim-signal does add these definitions conditioned on _MSC_VER, but I think that's wrong and should be deleted.) Btw, I don't see these signals used anywhere in remote-sim.c. Why did you need to add them?