diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-04 11:56:51 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-04 11:56:51 +0100 |
commit | f34cc6d5a8bad7a6c34f30917c3f137c886d29bf (patch) | |
tree | 3aadd84cbd653104ad324e8188b86399b3d20b13 | |
parent | 39376ba840a8682082eee9175b6951d4a7ae41f2 (diff) |
Include machine/db_interface instead of hardcoding function prototypes
* ddb/db_access.c: Include <machine/db_interface.h>.
(db_read_bytes, db_write_bytes): Remove functions prototypes.
(db_get_task_value): Fix calling db_read_bytes.
(db_put_task_value): Fix calling db_write_bytes.
* ddb/db_watch.c: Include <machine/db_interface.h>.
(db_set_hw_watchpoint, db_clear_hw_watchpoint): Remove functions prototypes.
-rw-r--r-- | ddb/db_access.c | 8 | ||||
-rw-r--r-- | ddb/db_watch.c | 4 |
2 files changed, 4 insertions, 8 deletions
diff --git a/ddb/db_access.c b/ddb/db_access.c index f06f950..6992255 100644 --- a/ddb/db_access.c +++ b/ddb/db_access.c @@ -32,6 +32,7 @@ #include <mach/boolean.h> #include <machine/db_machdep.h> /* type definitions */ +#include <machine/db_interface.h> /* function definitions */ #include <machine/setjmp.h> #include <kern/task.h> #include <ddb/db_access.h> @@ -43,9 +44,6 @@ * boundaries. */ -extern void db_read_bytes(); /* machine-dependent */ -extern void db_write_bytes(); /* machine-dependent */ - int db_access_level = DB_ACCESS_LEVEL; /* @@ -74,7 +72,7 @@ db_get_task_value(addr, size, is_signed, task) register db_expr_t value; register int i; - db_read_bytes((void*)addr, size, data, task); + db_read_bytes(addr, size, data, task); value = 0; #if BYTE_MSF @@ -113,7 +111,7 @@ db_put_task_value(addr, size, value, task) value >>= 8; } - db_write_bytes((void*)addr, size, data, task); + db_write_bytes(addr, size, data, task); } db_expr_t diff --git a/ddb/db_watch.c b/ddb/db_watch.c index 7eb9995..a2f852b 100644 --- a/ddb/db_watch.c +++ b/ddb/db_watch.c @@ -37,6 +37,7 @@ #include <vm/vm_map.h> #include <machine/db_machdep.h> +#include <machine/db_interface.h> #include <ddb/db_command.h> #include <ddb/db_lex.h> #include <ddb/db_watch.h> @@ -55,9 +56,6 @@ boolean_t db_watchpoints_inserted = TRUE; -extern boolean_t db_set_hw_watchpoint(db_watchpoint_t watch, unsigned hw_idx); -extern boolean_t db_clear_hw_watchpoint(unsigned hw_idx); - #define NWATCHPOINTS 100 struct db_watchpoint db_watch_table[NWATCHPOINTS]; db_watchpoint_t db_next_free_watchpoint = &db_watch_table[0]; |