Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>,
	 Tristan Gingold <gingold@adacore.com>
Subject: Re: [RFC] How to get target_ops from to_kill method?
Date: Mon, 16 Mar 2009 17:02:00 -0000	[thread overview]
Message-ID: <200903161642.27406.pedro@codesourcery.com> (raw)
In-Reply-To: <20090316162247.GE9576@adacore.com>

On Monday 16 March 2009 16:22:47, Joel Brobecker wrote:

> As I was hinting in one of my earlier emails, there is a nasty error
> in darwin-nat.c, in the fact that we set the darwin_ops->to_kill method
> to a procedure that has the wrong profile: darwin_kill_inferior takes
> a target_ops * as its parameter, whereas the to_kill method is supposed
> to take none!

Thank you very much for handling these breakages.

> As it turns out, all the routines being used by darwin_kill_inferior
> don't use the target_ops. So what my second patch did was extract out
> each of these routines inside another identical function, but without
> the target_ops parameter. What this does, basically, is defined the
> target_ops methods as wrappers to the real routines. This is what my
> second patch does.

I much prefer this version over the other.  It's incremental, and
doesn't add any hack or reference to the current_target global.

> 
> However, I'm really wondering whether it would make sense to have
> *all* the methods take the target_ops as the first parameter. We've
> been slowly adding this parameter as we need them, but really, why
> not be consistent across the board?

Mostly, because it's a bunch of work that affects most native
targets.  I tried hard to avoid missing any conversion in
the last set of changes, but, it ended up I broke a lot
of stuff...  But, yeah, there's a lot of inconsistency
here.

-- 
Pedro Alves


  reply	other threads:[~2009-03-16 16:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 16:42 Joel Brobecker
2009-03-16 17:02 ` Pedro Alves [this message]
2009-03-16 17:24   ` Joel Brobecker
2009-03-16 17:24     ` Pedro Alves
2009-03-16 19:07       ` Joel Brobecker
2009-03-16 22:22         ` Joel Brobecker
2009-03-17  0:05           ` Pedro Alves
2009-03-17 18:05             ` Joel Brobecker
2009-03-17 18:28               ` Pedro Alves
2009-03-17 19:11                 ` Joel Brobecker
2009-03-17 19:13                   ` Pedro Alves
2009-03-17 19:31                     ` Joel Brobecker

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=200903161642.27406.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gingold@adacore.com \
    /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