This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] auto-generate most target debug methods


>>>>> "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.

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.

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.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]