diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2007-12-07 15:02:12 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2007-12-07 15:02:12 +0000 |
commit | 49d03eab05e8f80cffaf764d4d26932bf00519d6 (patch) | |
tree | c36ea6df2ae30a7f9d86841f65f4a91483077523 /gdb/target.h | |
parent | 27524b67e16c96d7f8a266e99979ceb6ae953bc9 (diff) | |
download | gdb-49d03eab05e8f80cffaf764d4d26932bf00519d6.zip gdb-49d03eab05e8f80cffaf764d4d26932bf00519d6.tar.gz gdb-49d03eab05e8f80cffaf764d4d26932bf00519d6.tar.bz2 |
* target.c (update_current_target): Inherit to_log_command.
* target.h (struct target_ops). Add to_log_command.
(target_log_command): New macro.
* top.c (execute_command): Call target_log_command() rather than
serial_log_command().
* monitor.c (init_base_monitor_ops): Initialize to_log_command.
* remote-m32r-sdi.c (init_m32r_ops): Likewise.
* remote-mips.c (_initialize_remote_mips): Likewise.
* remote.c (init_remote_ops): Likewise.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/target.h b/gdb/target.h index 6dc3685..cb8db9b 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -404,6 +404,7 @@ struct target_ops int); struct exception_event_record *(*to_get_current_exception_event) (void); char *(*to_pid_to_exec_file) (int pid); + void (*to_log_command) (const char *); enum strata to_stratum; int to_has_all_memory; int to_has_memory; @@ -1130,6 +1131,14 @@ extern int target_stopped_data_address_p (struct target_ops *); extern const struct target_desc *target_read_description (struct target_ops *); +/* Command logging facility. */ + +#define target_log_command(p) \ + do \ + if (current_target.to_log_command) \ + (*current_target.to_log_command) (p); \ + while (0) + /* Routines for maintenance of the target structures... add_target: Add a target to the list of all possible targets. |