From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31504 invoked by alias); 22 Mar 2011 10:58:15 -0000 Received: (qmail 31455 invoked by uid 22791); 22 Mar 2011 10:58:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD 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; Tue, 22 Mar 2011 10:58:09 +0000 Received: (qmail 30388 invoked from network); 22 Mar 2011 10:58:07 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 22 Mar 2011 10:58:07 -0000 From: Pedro Alves To: Mark Kettenis Subject: Re: [RFC] Remove START_INFERIOR_TRAPS_EXPECTED macro from nm header Date: Tue, 22 Mar 2011 11:13:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.1; x86_64; ; ) Cc: gdb-patches@sourceware.org, pierre.muller@ics-cnrs.unistra.fr References: <003e01cbe825$321015a0$963040e0$@muller@ics-cnrs.unistra.fr> <201103220934.26493.pedro@codesourcery.com> <201103221023.p2MANXYX027907@glazunov.sibelius.xs4all.nl> In-Reply-To: <201103221023.p2MANXYX027907@glazunov.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201103221058.05078.pedro@codesourcery.com> 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: 2011-03/txt/msg00990.txt.bz2 On Tuesday 22 March 2011 10:23:33, Mark Kettenis wrote: > If you really think that getting rid of the nm header files is > something that has to be done (I'm not convinced it is), then perhaps > you should simply add: > > MH_CFLAGS=-DSTART_INFERIOR_TRAPS_EXPECTED=3 > > to the appropriate Makefile fragments. I'm not convinced that is an > improvmenet though. Yeah, but note that the H in MH_CFLAGS stands for _host_ --- macros like START_INFERIOR_TRAPS_EXPECTED make sense for the native backend, but not for a cross debugger built on that same host, so that isn't super correct either. Pierre, the macros that are evil and that we want to get rid of, are those that affect common code. For example, SOLIB_ADD: breakpoint.c:#ifdef SOLIB_ADD breakpoint.c: SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); breakpoint.c: step over a dlopen call and SOLIB_ADD is resetting the infcmd.c:#ifdef SOLIB_ADD infcmd.c: SOLIB_ADD (NULL, 0, target, auto_solib_add); infrun.c:#ifdef SOLIB_ADD infrun.c: SOLIB_ADD (NULL, 0, ¤t_target, auto_solib_add); infrun.c:#if defined(SOLIB_ADD) solib-frv.c: SOLIB_ADD. SOLIB_ADD eventually calls this this function, A GDB build that defines SOLIB_ADD (AIX is the only one) will be useless and quite broken as a cross debugger (e.g., "target remote" to debug with a Windows gdbserver), because SOLIB_ADD will expand to something that only makes (some, but not much!) sense for the _native_ backend. -- Pedro Alves