convert to_log_command

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_log_command.
	* target.h (struct target_ops) <to_log_command>: Use
	TARGET_DEFAULT_IGNORE.
	(target_log_command): Unconditionally delegate.
This commit is contained in:
Tom Tromey 2013-12-18 10:52:58 -07:00
parent 830ca33050
commit d9cb019581
4 changed files with 29 additions and 8 deletions

View file

@ -561,7 +561,8 @@ struct target_ops
TARGET_DEFAULT_FUNC (default_rcmd);
char *(*to_pid_to_exec_file) (struct target_ops *, int pid)
TARGET_DEFAULT_RETURN (0);
void (*to_log_command) (struct target_ops *, const char *);
void (*to_log_command) (struct target_ops *, const char *)
TARGET_DEFAULT_IGNORE ();
struct target_section_table *(*to_get_section_table) (struct target_ops *);
enum strata to_stratum;
int (*to_has_all_memory) (struct target_ops *);
@ -1930,12 +1931,8 @@ extern char *target_fileio_read_stralloc (const char *filename);
/* Command logging facility. */
#define target_log_command(p) \
do \
if (current_target.to_log_command) \
(*current_target.to_log_command) (&current_target, \
p); \
while (0)
#define target_log_command(p) \
(*current_target.to_log_command) (&current_target, p)
extern int target_core_of_thread (ptid_t ptid);