From: Pedro Alves <pedro@codesourcery.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org, pierre.muller@ics-cnrs.unistra.fr
Subject: Re: [RFC] Remove START_INFERIOR_TRAPS_EXPECTED macro from nm header
Date: Tue, 22 Mar 2011 11:13:00 -0000 [thread overview]
Message-ID: <201103221058.05078.pedro@codesourcery.com> (raw)
In-Reply-To: <201103221023.p2MANXYX027907@glazunov.sibelius.xs4all.nl>
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
prev parent reply other threads:[~2011-03-22 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 9:38 Pierre Muller
2011-03-22 9:41 ` Pedro Alves
2011-03-22 9:59 ` Pierre Muller
2011-03-22 10:05 ` Pedro Alves
2011-03-22 11:00 ` Mark Kettenis
2011-03-22 11:13 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103221058.05078.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox