summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2003-09-22 13:14:26 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2003-09-22 13:14:26 +0000
commitc6d35fa59f75ace288116fd2fb800134ef95741e (patch)
tree47c2783ec1c1e930da10159adf82e52b31142147
parent2003-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-c6d35fa59f75ace288116fd2fb800134ef95741e.tar.bz2
2003-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* monitor/monitor.h: Add rtems_monitor_commands[] (Illegally applied by shell/). Remove ifdef(__mips64) (Make broken code visible again). * monitor/mon-command.c: Add several ifndef RTEMS_UNIX to avoid warnings. * monitor/mon-monitor.c: Remove RTEMS_CPU_HAS_16_BIT_ADDRESSES (Make broken code visible again). * shell/cmds.c: Remove local decls of rtems_monitor_commands[].
-rw-r--r--cpukit/libmisc/ChangeLog11
-rw-r--r--cpukit/libmisc/monitor/mon-command.c4
-rw-r--r--cpukit/libmisc/monitor/mon-monitor.c10
-rw-r--r--cpukit/libmisc/monitor/monitor.h11
-rw-r--r--cpukit/libmisc/shell/cmds.c4
5 files changed, 22 insertions, 18 deletions
diff --git a/cpukit/libmisc/ChangeLog b/cpukit/libmisc/ChangeLog
index 7c6d4b48a6..ad663bc58a 100644
--- a/cpukit/libmisc/ChangeLog
+++ b/cpukit/libmisc/ChangeLog
@@ -1,3 +1,14 @@
+2003-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * monitor/monitor.h:
+ Add rtems_monitor_commands[] (Illegally applied by shell/).
+ Remove ifdef(__mips64) (Make broken code visible again).
+ * monitor/mon-command.c: Add several ifndef RTEMS_UNIX to avoid
+ warnings.
+ * monitor/mon-monitor.c: Remove RTEMS_CPU_HAS_16_BIT_ADDRESSES (Make
+ broken code visible again).
+ * shell/cmds.c: Remove local decls of rtems_monitor_commands[].
+
2003-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* monitor/monitor.h: Remove STREQ, STNEQ (pollute namespace),
diff --git a/cpukit/libmisc/monitor/mon-command.c b/cpukit/libmisc/monitor/mon-command.c
index 4072a21070..5812a1f3b5 100644
--- a/cpukit/libmisc/monitor/mon-command.c
+++ b/cpukit/libmisc/monitor/mon-command.c
@@ -94,6 +94,7 @@ struct translation_table
unsigned int key;
};
+#ifndef RTEMS_UNIX
static struct translation_table trans_two[] =
{
{ '~', 0, KEYS_INS },
@@ -150,6 +151,7 @@ static struct translation_table trans_tab[] =
{ 'O', trans_tab_O, 0 }, /* O are the fuction keys */
{ 0, 0, 0 }
};
+#endif
/*
* Perform a basic tranlation for some ANSI/VT100 key codes.
@@ -158,6 +160,7 @@ static struct translation_table trans_tab[] =
* line editor below so considiered not worth the effort.
*/
+#ifndef RTEMS_UNIX
static unsigned int
rtems_monitor_getchar (
)
@@ -213,6 +216,7 @@ rtems_monitor_getchar (
}
}
}
+#endif
#ifndef RTEMS_UNIX
/*
diff --git a/cpukit/libmisc/monitor/mon-monitor.c b/cpukit/libmisc/monitor/mon-monitor.c
index 6a5d9a5af8..52d588e82f 100644
--- a/cpukit/libmisc/monitor/mon-monitor.c
+++ b/cpukit/libmisc/monitor/mon-monitor.c
@@ -130,11 +130,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" symbol [ symbolname [symbolname ... ] ]",
0,
rtems_monitor_symbol_cmd,
-#if defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES)
- 0, /* XXX find a way to fix the compile time error on h8 */
-#else
(rtems_monitor_command_arg_t) &rtems_monitor_symbols,
-#endif
&rtems_monitor_commands[8],
},
{ "extension",
@@ -219,11 +215,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
"help [ command [ command ] ]",
0,
rtems_monitor_help_cmd,
-#if defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES)
- 0, /* XXX find a way to fix the compile time error on h8 */
-#else
(rtems_monitor_command_arg_t) rtems_monitor_commands,
-#endif
&rtems_monitor_commands[18],
},
#ifdef CPU_INVOKE_DEBUGGER
@@ -522,7 +514,7 @@ rtems_monitor_task(
debugee = _Thread_Executing;
rp = &debugee->Registers;
#if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE)
- fp = (rtems_context_fp *) debugee->fp_context; /* possibly 0 */
+ fp = debugee->fp_context; /* possibly 0 */
#else
fp = 0;
#endif
diff --git a/cpukit/libmisc/monitor/monitor.h b/cpukit/libmisc/monitor/monitor.h
index 752c01af51..219ad7ecd2 100644
--- a/cpukit/libmisc/monitor/monitor.h
+++ b/cpukit/libmisc/monitor/monitor.h
@@ -285,6 +285,9 @@ extern unsigned32 rtems_monitor_default_node; /* current default for commands *
typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t;
+/* FIXME: This should not be here */
+extern rtems_monitor_command_entry_t rtems_monitor_commands[];
+
typedef void ( *rtems_monitor_command_function_t )(
int argc,
char **argv,
@@ -292,11 +295,7 @@ typedef void ( *rtems_monitor_command_function_t )(
boolean verbose
);
-#if defined(__mips64)
- typedef unsigned64 rtems_monitor_command_arg_t;
-#else
- typedef unsigned32 rtems_monitor_command_arg_t;
-#endif
+typedef unsigned32 rtems_monitor_command_arg_t;
struct rtems_monitor_command_entry_s {
char *command; /* command name */
@@ -305,7 +304,7 @@ struct rtems_monitor_command_entry_s {
rtems_monitor_command_function_t command_function;
/* Some argument for the command */
rtems_monitor_command_arg_t command_arg;
- struct rtems_monitor_command_entry_s *next;
+ rtems_monitor_command_entry_t *next;
};
typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *);
diff --git a/cpukit/libmisc/shell/cmds.c b/cpukit/libmisc/shell/cmds.c
index 5cc630ef24..2c462007df 100644
--- a/cpukit/libmisc/shell/cmds.c
+++ b/cpukit/libmisc/shell/cmds.c
@@ -469,18 +469,16 @@ int main_chmod(int argc,char *argv[])
*-----------------------------------------------------------*/
int main_monitor(int argc,char * argv[]) {
rtems_monitor_command_entry_t *command;
- extern rtems_monitor_command_entry_t rtems_monitor_commands[];
rtems_task_ident(RTEMS_SELF,0,&rtems_monitor_task_id);
rtems_monitor_node = rtems_get_node(rtems_monitor_task_id);
rtems_monitor_default_node = rtems_monitor_node;
if ((command=rtems_monitor_command_lookup(rtems_monitor_commands,argc,argv)))
- command->command_function(argc, argv, command->command_arg, 0);
+ command->command_function(argc, argv, &command->command_arg, 0);
return 0;
}
/*-----------------------------------------------------------*/
void register_cmds(void) {
rtems_monitor_command_entry_t *command;
- extern rtems_monitor_command_entry_t rtems_monitor_commands[];
/* monitor topic */
command=rtems_monitor_commands;
while (command) {