From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25210 invoked by alias); 4 Sep 2010 20:48:57 -0000 Received: (qmail 25198 invoked by uid 22791); 4 Sep 2010 20:48:53 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD,UPPERCASE_50_75 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; Sat, 04 Sep 2010 20:48:46 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o84KmHCP030674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 4 Sep 2010 16:48:17 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o84KmEtj012162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Sep 2010 16:48:16 -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 o84KmEXq007627; Sat, 4 Sep 2010 22:48:14 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o84KmC69007620; Sat, 4 Sep 2010 22:48:12 +0200 Date: Mon, 06 Sep 2010 00:29:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Daniel Jacobowitz , Joel Brobecker , Eli Zaretskii , Mark Kettenis Subject: Re: [patch 1/9]#2 Rename `enum target_signal' to target_signal_t Message-ID: <20100904204812.GA14878@host1.dyn.jankratochvil.net> References: <20100901200621.GA11085@caradoc.them.org> <201009012108.56984.pedro@codesourcery.com> <201009020254.47745.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201009020254.47745.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-09/txt/msg00142.txt.bz2 On Thu, 02 Sep 2010 03:54:47 +0200, Pedro Alves wrote: > typedef const struct target_signal_o * target_signal; BTW if you omit this line of your patch it still compiles without a hiccup. - retsig = (int) oursig - (int) TARGET_SIGNAL_REALTIME_33 + 33; + retsig = oursig->number - TARGET_SIGNAL_REALTIME_33->number + 33; (only on 32bit arches) Anyway OK to check-in at least this noncontroversial part? Checked in DWARF the enum definition stays the same. Thanks, Jan gdb/ 2010-09-04 Pedro Alves Jan Kratochvil * common/signals.c (ANY): Remove. (SET): No longer use ANY. gdb/ 2010-09-04 Pedro Alves * signals.def: Replace all ANY uses by SET with specific numbers. * signals.h (ANY): Remove. --- a/gdb/common/signals.c +++ b/gdb/common/signals.c @@ -55,10 +55,8 @@ static const struct { const char *string; } signals [] = { -#define SET(symbol, constant, name, string) ANY (symbol, name, string) -#define ANY(symbol, name, string) { name, string }, +#define SET(symbol, constant, name, string) { name, string }, #include "gdb/signals.def" -#undef ANY #undef SET }; --- a/include/gdb/signals.def +++ b/include/gdb/signals.def @@ -105,96 +105,96 @@ SET (TARGET_SIGNAL_CANCEL, 76, "SIGCANCEL", "LWP internal signal") GNU/Linux does, and we can't disturb the numbering, since it's part of the remote protocol. Note that in some GDB's TARGET_SIGNAL_REALTIME_32 is number 76. */ -ANY (TARGET_SIGNAL_REALTIME_32, "SIG32", "Real-time event 32") +SET (TARGET_SIGNAL_REALTIME_32, 77, "SIG32", "Real-time event 32") /* Yet another pain, IRIX 6 has SIG64. */ -ANY (TARGET_SIGNAL_REALTIME_64, "SIG64", "Real-time event 64") +SET (TARGET_SIGNAL_REALTIME_64, 78, "SIG64", "Real-time event 64") /* Yet another pain, GNU/Linux MIPS might go up to 128. */ -ANY (TARGET_SIGNAL_REALTIME_65, "SIG65", "Real-time event 65") -ANY (TARGET_SIGNAL_REALTIME_66, "SIG66", "Real-time event 66") -ANY (TARGET_SIGNAL_REALTIME_67, "SIG67", "Real-time event 67") -ANY (TARGET_SIGNAL_REALTIME_68, "SIG68", "Real-time event 68") -ANY (TARGET_SIGNAL_REALTIME_69, "SIG69", "Real-time event 69") -ANY (TARGET_SIGNAL_REALTIME_70, "SIG70", "Real-time event 70") -ANY (TARGET_SIGNAL_REALTIME_71, "SIG71", "Real-time event 71") -ANY (TARGET_SIGNAL_REALTIME_72, "SIG72", "Real-time event 72") -ANY (TARGET_SIGNAL_REALTIME_73, "SIG73", "Real-time event 73") -ANY (TARGET_SIGNAL_REALTIME_74, "SIG74", "Real-time event 74") -ANY (TARGET_SIGNAL_REALTIME_75, "SIG75", "Real-time event 75") -ANY (TARGET_SIGNAL_REALTIME_76, "SIG76", "Real-time event 76") -ANY (TARGET_SIGNAL_REALTIME_77, "SIG77", "Real-time event 77") -ANY (TARGET_SIGNAL_REALTIME_78, "SIG78", "Real-time event 78") -ANY (TARGET_SIGNAL_REALTIME_79, "SIG79", "Real-time event 79") -ANY (TARGET_SIGNAL_REALTIME_80, "SIG80", "Real-time event 80") -ANY (TARGET_SIGNAL_REALTIME_81, "SIG81", "Real-time event 81") -ANY (TARGET_SIGNAL_REALTIME_82, "SIG82", "Real-time event 82") -ANY (TARGET_SIGNAL_REALTIME_83, "SIG83", "Real-time event 83") -ANY (TARGET_SIGNAL_REALTIME_84, "SIG84", "Real-time event 84") -ANY (TARGET_SIGNAL_REALTIME_85, "SIG85", "Real-time event 85") -ANY (TARGET_SIGNAL_REALTIME_86, "SIG86", "Real-time event 86") -ANY (TARGET_SIGNAL_REALTIME_87, "SIG87", "Real-time event 87") -ANY (TARGET_SIGNAL_REALTIME_88, "SIG88", "Real-time event 88") -ANY (TARGET_SIGNAL_REALTIME_89, "SIG89", "Real-time event 89") -ANY (TARGET_SIGNAL_REALTIME_90, "SIG90", "Real-time event 90") -ANY (TARGET_SIGNAL_REALTIME_91, "SIG91", "Real-time event 91") -ANY (TARGET_SIGNAL_REALTIME_92, "SIG92", "Real-time event 92") -ANY (TARGET_SIGNAL_REALTIME_93, "SIG93", "Real-time event 93") -ANY (TARGET_SIGNAL_REALTIME_94, "SIG94", "Real-time event 94") -ANY (TARGET_SIGNAL_REALTIME_95, "SIG95", "Real-time event 95") -ANY (TARGET_SIGNAL_REALTIME_96, "SIG96", "Real-time event 96") -ANY (TARGET_SIGNAL_REALTIME_97, "SIG97", "Real-time event 97") -ANY (TARGET_SIGNAL_REALTIME_98, "SIG98", "Real-time event 98") -ANY (TARGET_SIGNAL_REALTIME_99, "SIG99", "Real-time event 99") -ANY (TARGET_SIGNAL_REALTIME_100, "SIG100", "Real-time event 100") -ANY (TARGET_SIGNAL_REALTIME_101, "SIG101", "Real-time event 101") -ANY (TARGET_SIGNAL_REALTIME_102, "SIG102", "Real-time event 102") -ANY (TARGET_SIGNAL_REALTIME_103, "SIG103", "Real-time event 103") -ANY (TARGET_SIGNAL_REALTIME_104, "SIG104", "Real-time event 104") -ANY (TARGET_SIGNAL_REALTIME_105, "SIG105", "Real-time event 105") -ANY (TARGET_SIGNAL_REALTIME_106, "SIG106", "Real-time event 106") -ANY (TARGET_SIGNAL_REALTIME_107, "SIG107", "Real-time event 107") -ANY (TARGET_SIGNAL_REALTIME_108, "SIG108", "Real-time event 108") -ANY (TARGET_SIGNAL_REALTIME_109, "SIG109", "Real-time event 109") -ANY (TARGET_SIGNAL_REALTIME_110, "SIG110", "Real-time event 110") -ANY (TARGET_SIGNAL_REALTIME_111, "SIG111", "Real-time event 111") -ANY (TARGET_SIGNAL_REALTIME_112, "SIG112", "Real-time event 112") -ANY (TARGET_SIGNAL_REALTIME_113, "SIG113", "Real-time event 113") -ANY (TARGET_SIGNAL_REALTIME_114, "SIG114", "Real-time event 114") -ANY (TARGET_SIGNAL_REALTIME_115, "SIG115", "Real-time event 115") -ANY (TARGET_SIGNAL_REALTIME_116, "SIG116", "Real-time event 116") -ANY (TARGET_SIGNAL_REALTIME_117, "SIG117", "Real-time event 117") -ANY (TARGET_SIGNAL_REALTIME_118, "SIG118", "Real-time event 118") -ANY (TARGET_SIGNAL_REALTIME_119, "SIG119", "Real-time event 119") -ANY (TARGET_SIGNAL_REALTIME_120, "SIG120", "Real-time event 120") -ANY (TARGET_SIGNAL_REALTIME_121, "SIG121", "Real-time event 121") -ANY (TARGET_SIGNAL_REALTIME_122, "SIG122", "Real-time event 122") -ANY (TARGET_SIGNAL_REALTIME_123, "SIG123", "Real-time event 123") -ANY (TARGET_SIGNAL_REALTIME_124, "SIG124", "Real-time event 124") -ANY (TARGET_SIGNAL_REALTIME_125, "SIG125", "Real-time event 125") -ANY (TARGET_SIGNAL_REALTIME_126, "SIG126", "Real-time event 126") -ANY (TARGET_SIGNAL_REALTIME_127, "SIG127", "Real-time event 127") +SET (TARGET_SIGNAL_REALTIME_65, 79, "SIG65", "Real-time event 65") +SET (TARGET_SIGNAL_REALTIME_66, 80, "SIG66", "Real-time event 66") +SET (TARGET_SIGNAL_REALTIME_67, 81, "SIG67", "Real-time event 67") +SET (TARGET_SIGNAL_REALTIME_68, 82, "SIG68", "Real-time event 68") +SET (TARGET_SIGNAL_REALTIME_69, 83, "SIG69", "Real-time event 69") +SET (TARGET_SIGNAL_REALTIME_70, 84, "SIG70", "Real-time event 70") +SET (TARGET_SIGNAL_REALTIME_71, 85, "SIG71", "Real-time event 71") +SET (TARGET_SIGNAL_REALTIME_72, 86, "SIG72", "Real-time event 72") +SET (TARGET_SIGNAL_REALTIME_73, 87, "SIG73", "Real-time event 73") +SET (TARGET_SIGNAL_REALTIME_74, 88, "SIG74", "Real-time event 74") +SET (TARGET_SIGNAL_REALTIME_75, 89, "SIG75", "Real-time event 75") +SET (TARGET_SIGNAL_REALTIME_76, 90, "SIG76", "Real-time event 76") +SET (TARGET_SIGNAL_REALTIME_77, 91, "SIG77", "Real-time event 77") +SET (TARGET_SIGNAL_REALTIME_78, 92, "SIG78", "Real-time event 78") +SET (TARGET_SIGNAL_REALTIME_79, 93, "SIG79", "Real-time event 79") +SET (TARGET_SIGNAL_REALTIME_80, 94, "SIG80", "Real-time event 80") +SET (TARGET_SIGNAL_REALTIME_81, 95, "SIG81", "Real-time event 81") +SET (TARGET_SIGNAL_REALTIME_82, 96, "SIG82", "Real-time event 82") +SET (TARGET_SIGNAL_REALTIME_83, 97, "SIG83", "Real-time event 83") +SET (TARGET_SIGNAL_REALTIME_84, 98, "SIG84", "Real-time event 84") +SET (TARGET_SIGNAL_REALTIME_85, 99, "SIG85", "Real-time event 85") +SET (TARGET_SIGNAL_REALTIME_86, 100, "SIG86", "Real-time event 86") +SET (TARGET_SIGNAL_REALTIME_87, 101, "SIG87", "Real-time event 87") +SET (TARGET_SIGNAL_REALTIME_88, 102, "SIG88", "Real-time event 88") +SET (TARGET_SIGNAL_REALTIME_89, 103, "SIG89", "Real-time event 89") +SET (TARGET_SIGNAL_REALTIME_90, 104, "SIG90", "Real-time event 90") +SET (TARGET_SIGNAL_REALTIME_91, 105, "SIG91", "Real-time event 91") +SET (TARGET_SIGNAL_REALTIME_92, 106, "SIG92", "Real-time event 92") +SET (TARGET_SIGNAL_REALTIME_93, 107, "SIG93", "Real-time event 93") +SET (TARGET_SIGNAL_REALTIME_94, 108, "SIG94", "Real-time event 94") +SET (TARGET_SIGNAL_REALTIME_95, 109, "SIG95", "Real-time event 95") +SET (TARGET_SIGNAL_REALTIME_96, 110, "SIG96", "Real-time event 96") +SET (TARGET_SIGNAL_REALTIME_97, 111, "SIG97", "Real-time event 97") +SET (TARGET_SIGNAL_REALTIME_98, 112, "SIG98", "Real-time event 98") +SET (TARGET_SIGNAL_REALTIME_99, 113, "SIG99", "Real-time event 99") +SET (TARGET_SIGNAL_REALTIME_100, 114, "SIG100", "Real-time event 100") +SET (TARGET_SIGNAL_REALTIME_101, 115, "SIG101", "Real-time event 101") +SET (TARGET_SIGNAL_REALTIME_102, 116, "SIG102", "Real-time event 102") +SET (TARGET_SIGNAL_REALTIME_103, 117, "SIG103", "Real-time event 103") +SET (TARGET_SIGNAL_REALTIME_104, 118, "SIG104", "Real-time event 104") +SET (TARGET_SIGNAL_REALTIME_105, 119, "SIG105", "Real-time event 105") +SET (TARGET_SIGNAL_REALTIME_106, 120, "SIG106", "Real-time event 106") +SET (TARGET_SIGNAL_REALTIME_107, 121, "SIG107", "Real-time event 107") +SET (TARGET_SIGNAL_REALTIME_108, 122, "SIG108", "Real-time event 108") +SET (TARGET_SIGNAL_REALTIME_109, 123, "SIG109", "Real-time event 109") +SET (TARGET_SIGNAL_REALTIME_110, 124, "SIG110", "Real-time event 110") +SET (TARGET_SIGNAL_REALTIME_111, 125, "SIG111", "Real-time event 111") +SET (TARGET_SIGNAL_REALTIME_112, 126, "SIG112", "Real-time event 112") +SET (TARGET_SIGNAL_REALTIME_113, 127, "SIG113", "Real-time event 113") +SET (TARGET_SIGNAL_REALTIME_114, 128, "SIG114", "Real-time event 114") +SET (TARGET_SIGNAL_REALTIME_115, 129, "SIG115", "Real-time event 115") +SET (TARGET_SIGNAL_REALTIME_116, 130, "SIG116", "Real-time event 116") +SET (TARGET_SIGNAL_REALTIME_117, 131, "SIG117", "Real-time event 117") +SET (TARGET_SIGNAL_REALTIME_118, 132, "SIG118", "Real-time event 118") +SET (TARGET_SIGNAL_REALTIME_119, 133, "SIG119", "Real-time event 119") +SET (TARGET_SIGNAL_REALTIME_120, 134, "SIG120", "Real-time event 120") +SET (TARGET_SIGNAL_REALTIME_121, 135, "SIG121", "Real-time event 121") +SET (TARGET_SIGNAL_REALTIME_122, 136, "SIG122", "Real-time event 122") +SET (TARGET_SIGNAL_REALTIME_123, 137, "SIG123", "Real-time event 123") +SET (TARGET_SIGNAL_REALTIME_124, 138, "SIG124", "Real-time event 124") +SET (TARGET_SIGNAL_REALTIME_125, 139, "SIG125", "Real-time event 125") +SET (TARGET_SIGNAL_REALTIME_126, 140, "SIG126", "Real-time event 126") +SET (TARGET_SIGNAL_REALTIME_127, 141, "SIG127", "Real-time event 127") -ANY (TARGET_SIGNAL_INFO, "SIGINFO", "Information request") +SET (TARGET_SIGNAL_INFO, 142, "SIGINFO", "Information request") /* Some signal we don't know about. */ -ANY (TARGET_SIGNAL_UNKNOWN, NULL, "Unknown signal") +SET (TARGET_SIGNAL_UNKNOWN, 143, NULL, "Unknown signal") /* Use whatever signal we use when one is not specifically specified (for passing to proceed and so on). */ -ANY (TARGET_SIGNAL_DEFAULT, NULL, +SET (TARGET_SIGNAL_DEFAULT, 144, NULL, "Internal error: printing TARGET_SIGNAL_DEFAULT") /* Mach exceptions. In versions of GDB before 5.2, these were just before TARGET_SIGNAL_INFO if you were compiling on a Mach host (and missing otherwise). */ -ANY (TARGET_EXC_BAD_ACCESS, "EXC_BAD_ACCESS", "Could not access memory") -ANY (TARGET_EXC_BAD_INSTRUCTION, "EXC_BAD_INSTRUCTION", +SET (TARGET_EXC_BAD_ACCESS, 145, "EXC_BAD_ACCESS", "Could not access memory") +SET (TARGET_EXC_BAD_INSTRUCTION, 146, "EXC_BAD_INSTRUCTION", "Illegal instruction/operand") -ANY (TARGET_EXC_ARITHMETIC, "EXC_ARITHMETIC", "Arithmetic exception") -ANY (TARGET_EXC_EMULATION, "EXC_EMULATION", "Emulation instruction") -ANY (TARGET_EXC_SOFTWARE, "EXC_SOFTWARE", "Software generated exception") -ANY (TARGET_EXC_BREAKPOINT, "EXC_BREAKPOINT", "Breakpoint") +SET (TARGET_EXC_ARITHMETIC, 147, "EXC_ARITHMETIC", "Arithmetic exception") +SET (TARGET_EXC_EMULATION, 148, "EXC_EMULATION", "Emulation instruction") +SET (TARGET_EXC_SOFTWARE, 149, "EXC_SOFTWARE", "Software generated exception") +SET (TARGET_EXC_BREAKPOINT, 150, "EXC_BREAKPOINT", "Breakpoint") /* If you are adding a new signal, add it just above this comment. */ /* Last and unused enum value, for sizing arrays, etc. */ -ANY (TARGET_SIGNAL_LAST, NULL, "TARGET_SIGNAL_MAGIC") +SET (TARGET_SIGNAL_LAST, 151, NULL, "TARGET_SIGNAL_MAGIC") --- a/include/gdb/signals.h +++ b/include/gdb/signals.h @@ -53,10 +53,7 @@ enum target_signal { #define SET(symbol, constant, name, string) \ symbol = constant, -#define ANY(symbol, name, string) \ - symbol, #include "gdb/signals.def" -#undef ANY #undef SET };