From: Joel Brobecker <brobecker@adacore.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Pierre Muller <muller@ics.u-strasbg.fr>, gdb-patches@sourceware.org
Subject: Re: [RFA] Remove unecessary checks for macros in target.h
Date: Fri, 08 May 2009 20:32:00 -0000 [thread overview]
Message-ID: <20090508203149.GK659@adacore.com> (raw)
In-Reply-To: <4A046173.8030704@caviumnetworks.com>
> However, I do wonder if it would make sense to remove the macros
> altogether, and just push the expansions down into the code. If we
> really don't want to be able to switch in different implementations of
> these things, what is the point of an added layer of abstraction?
Eventually, we'll want these macros to be functions, I think.
I'd personally like it if they all had the target_ops as the first
parameter, so that the target function can find the "target beneath"
and call its associated routine if needed. For instance:
static void
sol_thread_detach (struct target_ops *ops, char *args, int from_tty)
{
struct target_ops *beneath = find_target_beneath (ops);
sol_thread_active = 0;
inferior_ptid = pid_to_ptid (PIDGET (main_ph.ptid));
unpush_target (ops);
beneath->to_detach (beneath, args, from_tty);
}
--
Joel
prev parent reply other threads:[~2009-05-08 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 13:50 Pierre Muller
2009-05-08 15:30 ` Joel Brobecker
2009-05-08 16:45 ` David Daney
2009-05-08 20:32 ` Joel Brobecker [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=20090508203149.GK659@adacore.com \
--to=brobecker@adacore.com \
--cc=ddaney@caviumnetworks.com \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.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