From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] auto-generate most target debug methods
Date: Thu, 17 Jul 2014 16:52:00 -0000 [thread overview]
Message-ID: <53C7FDDD.1090805@redhat.com> (raw)
In-Reply-To: <87d2d4x7ju.fsf@fleche.redhat.com>
On 07/17/2014 05:40 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
>>> have extra arguments (I happened to see target_get_section_table).
>
> Pedro> Hmm, I think you might have looked at some other method. That
> Pedro> one's arguments seem to match.
>
> Sorry, I wasn't totally clear.
> That particular function takes a target_ops parameter -- but generally
> the target_* entry points do not.
Ah.
>
> Pedro> But yeah, there's some missing uniformity here. E.g.,
> Pedro> target_terminal_inferior is currently horrible for actually
> Pedro> bypassing calling the target method in some cases. target_detach
> Pedro> is another case that does extra work.
>
> Another somewhat related oddity in the current code is that some spots
> bypass these entry points, or at least seem to. Search for
> "current_target.beneath" outside of target.[ch] to see.
Yeah, most of those are related to xfer_partial. I wrote somewhere
that I thought we can actually make that one a regular delegated
method now, but I don't have the pointer handy, nor do I off hand
recall why. But I can look it up if you want me to.
>
> Pedro> I was thinking simpler maintenance and clearer resulting code, by
> Pedro> enforcing the rule that the entry point does nothing more than
> Pedro> calling the target_ops method, to avoid surprises like
> Pedro> target_terminal_inferior.
>
> Yeah, ok. Well, that makes sense, it's just unclear to me if the
> cost/benefit ratio is in our favor here, given the apparent amount of
> inconsistency already in-tree.
Yeah, agreed. It was just a thought, brainstorming material.
I'm definitely not going to jump right into attempting it.
--
Pedro Alves
next prev parent reply other threads:[~2014-07-17 16:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 20:04 Tom Tromey
2014-06-20 8:00 ` Yao Qi
2014-06-20 14:04 ` Tom Tromey
2014-07-15 11:17 ` Pedro Alves
2014-07-15 15:20 ` Tom Tromey
2014-07-16 15:46 ` Tom Tromey
2014-07-17 14:50 ` Pedro Alves
2014-07-17 16:12 ` Tom Tromey
2014-07-17 16:35 ` Pedro Alves
2014-07-17 16:41 ` Tom Tromey
2014-07-17 16:52 ` Pedro Alves [this message]
2014-07-17 16:49 ` Tom Tromey
2014-07-17 16:51 ` Pedro Alves
2014-07-24 13:59 ` Tom Tromey
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=53C7FDDD.1090805@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).