2003-09-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

PR 495/rtems_misc
	* capture/capture-cli.c, monitor/mon-command.c, monitor/mon-config.c,
	monitor/mon-monitor.c, monitor/mon-object.c, monitor/mon-symbols.c,
	monitor/monitor.h, shell/cmds.c: Move to making libmisc 16/32 bit
	clean.
This commit is contained in:
Joel Sherrill
2003-09-26 17:42:45 +00:00
parent 1f5a1afeae
commit d4c40786f6
9 changed files with 82 additions and 67 deletions

View File

@@ -1,3 +1,11 @@
2003-09-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
PR 495/rtems_misc
* capture/capture-cli.c, monitor/mon-command.c, monitor/mon-config.c,
monitor/mon-monitor.c, monitor/mon-object.c, monitor/mon-symbols.c,
monitor/monitor.h, shell/cmds.c: Move to making libmisc 16/32 bit
clean.
2003-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2003-09-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* monitor/monitor.h: * monitor/monitor.h:

View File

@@ -65,7 +65,7 @@ static void
rtems_capture_cli_open ( rtems_capture_cli_open (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_unsigned32 size = 0; rtems_unsigned32 size = 0;
@@ -137,7 +137,7 @@ static void
rtems_capture_cli_close ( rtems_capture_cli_close (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -166,7 +166,7 @@ static void
rtems_capture_cli_enable ( rtems_capture_cli_enable (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -195,7 +195,7 @@ static void
rtems_capture_cli_disable ( rtems_capture_cli_disable (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -224,7 +224,7 @@ static void
rtems_capture_cli_task_list ( rtems_capture_cli_task_list (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_task_priority ceiling = rtems_capture_watch_get_ceiling (); rtems_task_priority ceiling = rtems_capture_watch_get_ceiling ();
@@ -460,7 +460,7 @@ static void
rtems_capture_cli_task_load ( rtems_capture_cli_task_load (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -531,7 +531,7 @@ static void
rtems_capture_cli_watch_list ( rtems_capture_cli_watch_list (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_capture_control_t* control = rtems_capture_get_control_list (); rtems_capture_control_t* control = rtems_capture_get_control_list ();
@@ -657,7 +657,7 @@ static void
rtems_capture_cli_watch_add ( rtems_capture_cli_watch_add (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -719,7 +719,7 @@ static void
rtems_capture_cli_watch_del ( rtems_capture_cli_watch_del (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -780,7 +780,7 @@ static void
rtems_capture_cli_watch_control ( rtems_capture_cli_watch_control (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -846,7 +846,7 @@ static void
rtems_capture_cli_watch_global ( rtems_capture_cli_watch_global (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -900,7 +900,7 @@ static void
rtems_capture_cli_watch_ceiling ( rtems_capture_cli_watch_ceiling (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -951,7 +951,7 @@ static void
rtems_capture_cli_watch_floor ( rtems_capture_cli_watch_floor (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -1002,7 +1002,7 @@ static void
rtems_capture_cli_trigger_set ( rtems_capture_cli_trigger_set (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -1158,7 +1158,7 @@ static void
rtems_capture_cli_trace_records ( rtems_capture_cli_trace_records (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;
@@ -1283,7 +1283,7 @@ static void
rtems_capture_cli_flush ( rtems_capture_cli_flush (
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose ) boolean verbose )
{ {
rtems_status_code sc; rtems_status_code sc;

View File

@@ -572,7 +572,7 @@ rtems_monitor_command_lookup(
return 0; return 0;
} }
void static void
rtems_monitor_show_help ( rtems_monitor_show_help (
rtems_monitor_command_entry_t *help_cmd, rtems_monitor_command_entry_t *help_cmd,
int max_cmd_len int max_cmd_len
@@ -726,14 +726,14 @@ void
rtems_monitor_help_cmd( rtems_monitor_help_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose boolean verbose
) )
{ {
int arg; int arg;
rtems_monitor_command_entry_t *command; rtems_monitor_command_entry_t *command;
command = (rtems_monitor_command_entry_t *) command_arg; command = command_arg->monitor_command_entry;
if (argc == 1) if (argc == 1)
rtems_monitor_command_usage(command, 0); rtems_monitor_command_usage(command, 0);

View File

@@ -103,8 +103,8 @@ rtems_monitor_config_dump(
length = 0; length = 0;
length += printf("WORKSPACE"); length += printf("WORKSPACE");
length += rtems_monitor_pad(DATACOL, length); length += rtems_monitor_pad(DATACOL, length);
length += printf("start: 0x%x; size: 0x%x\n", length += printf("start: %p; size: 0x%x\n",
(unsigned32) monitor_config->work_space_start, monitor_config->work_space_start,
monitor_config->work_space_size); monitor_config->work_space_size);
length = 0; length = 0;

View File

@@ -75,21 +75,21 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
"Show the system configuration.", "Show the system configuration.",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_CONFIG, { RTEMS_MONITOR_OBJECT_CONFIG },
&rtems_monitor_commands[1], &rtems_monitor_commands[1],
}, },
{ "itask", { "itask",
"List init tasks for the system", "List init tasks for the system",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INIT_TASK, { RTEMS_MONITOR_OBJECT_INIT_TASK },
&rtems_monitor_commands[2], &rtems_monitor_commands[2],
}, },
{ "mpci", { "mpci",
"Show the MPCI system configuration, if configured.", "Show the MPCI system configuration, if configured.",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_MPCI, { RTEMS_MONITOR_OBJECT_MPCI },
&rtems_monitor_commands[3], &rtems_monitor_commands[3],
}, },
{ "pause", { "pause",
@@ -98,7 +98,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" pause [ticks]", " pause [ticks]",
0, 0,
rtems_monitor_pause_cmd, rtems_monitor_pause_cmd,
0, { 0 },
&rtems_monitor_commands[4], &rtems_monitor_commands[4],
}, },
{ "continue", { "continue",
@@ -106,14 +106,14 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
"program running.\n", "program running.\n",
0, 0,
rtems_monitor_continue_cmd, rtems_monitor_continue_cmd,
0, { 0 },
&rtems_monitor_commands[5], &rtems_monitor_commands[5],
}, },
{ "go", { "go",
"Alias for 'continue'", "Alias for 'continue'",
0, 0,
rtems_monitor_continue_cmd, rtems_monitor_continue_cmd,
0, { 0 },
&rtems_monitor_commands[6], &rtems_monitor_commands[6],
}, },
{ "node", { "node",
@@ -121,7 +121,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" node [ node number ]", " node [ node number ]",
0, 0,
rtems_monitor_node_cmd, rtems_monitor_node_cmd,
0, { 0 },
&rtems_monitor_commands[7], &rtems_monitor_commands[7],
}, },
{ "symbol", { "symbol",
@@ -130,7 +130,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" symbol [ symbolname [symbolname ... ] ]", " symbol [ symbolname [symbolname ... ] ]",
0, 0,
rtems_monitor_symbol_cmd, rtems_monitor_symbol_cmd,
(rtems_monitor_command_arg_t) &rtems_monitor_symbols, { .symbol_table = &rtems_monitor_symbols },
&rtems_monitor_commands[8], &rtems_monitor_commands[8],
}, },
{ "extension", { "extension",
@@ -139,7 +139,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" extension [id [id ...] ]", " extension [id [id ...] ]",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_EXTENSION, { RTEMS_MONITOR_OBJECT_EXTENSION },
&rtems_monitor_commands[9], &rtems_monitor_commands[9],
}, },
{ "task", { "task",
@@ -148,7 +148,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" task [id [id ...] ]", " task [id [id ...] ]",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_TASK, { RTEMS_MONITOR_OBJECT_TASK },
&rtems_monitor_commands[10], &rtems_monitor_commands[10],
}, },
{ "queue", { "queue",
@@ -157,7 +157,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" queue [id [id ... ] ]", " queue [id [id ... ] ]",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_QUEUE, { RTEMS_MONITOR_OBJECT_QUEUE },
&rtems_monitor_commands[11], &rtems_monitor_commands[11],
}, },
{ "object", { "object",
@@ -167,7 +167,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" object [id [id ...] ]", " object [id [id ...] ]",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INVALID, { RTEMS_MONITOR_OBJECT_INVALID },
&rtems_monitor_commands[12], &rtems_monitor_commands[12],
}, },
{ "driver", { "driver",
@@ -175,14 +175,14 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" driver [ major [ major ... ] ]", " driver [ major [ major ... ] ]",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DRIVER, { RTEMS_MONITOR_OBJECT_DRIVER },
&rtems_monitor_commands[13], &rtems_monitor_commands[13],
}, },
{ "dname", { "dname",
"Displays information about named drivers.\n", "Displays information about named drivers.\n",
0, 0,
rtems_monitor_object_cmd, rtems_monitor_object_cmd,
(rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DNAME, { RTEMS_MONITOR_OBJECT_DNAME },
&rtems_monitor_commands[14], &rtems_monitor_commands[14],
}, },
{ "exit", { "exit",
@@ -191,7 +191,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" exit [status]", " exit [status]",
0, 0,
rtems_monitor_fatal_cmd, rtems_monitor_fatal_cmd,
(rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL, { .status_code = RTEMS_SUCCESSFUL },
&rtems_monitor_commands[15], &rtems_monitor_commands[15],
}, },
{ "fatal", { "fatal",
@@ -199,14 +199,14 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
" fatal [status]", " fatal [status]",
0, 0,
rtems_monitor_fatal_cmd, rtems_monitor_fatal_cmd,
(rtems_monitor_command_arg_t) RTEMS_TASK_EXITTED, /* exit value */ { .status_code = RTEMS_TASK_EXITTED }, /* exit value */
&rtems_monitor_commands[16], &rtems_monitor_commands[16],
}, },
{ "quit", { "quit",
"Alias for 'exit'\n", "Alias for 'exit'\n",
0, 0,
rtems_monitor_fatal_cmd, rtems_monitor_fatal_cmd,
(rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL, /* exit value */ { .status_code = RTEMS_SUCCESSFUL }, /* exit value */
&rtems_monitor_commands[17], &rtems_monitor_commands[17],
}, },
{ "help", { "help",
@@ -215,7 +215,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
"help [ command [ command ] ]", "help [ command [ command ] ]",
0, 0,
rtems_monitor_help_cmd, rtems_monitor_help_cmd,
(rtems_monitor_command_arg_t) rtems_monitor_commands, { .monitor_command_entry = rtems_monitor_commands },
&rtems_monitor_commands[18], &rtems_monitor_commands[18],
}, },
#ifdef CPU_INVOKE_DEBUGGER #ifdef CPU_INVOKE_DEBUGGER
@@ -224,11 +224,11 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
"A continue from the debugger will return to the monitor.\n", "A continue from the debugger will return to the monitor.\n",
0, 0,
rtems_monitor_debugger_cmd, rtems_monitor_debugger_cmd,
0, { 0 },
&rtems_monitor_commands[19], &rtems_monitor_commands[19],
}, },
#endif #endif
{ 0, 0, 0, 0, 0, &rtems_registered_commands }, { 0, 0, 0, 0, { 0 }, &rtems_registered_commands },
}; };
@@ -257,7 +257,7 @@ void
rtems_monitor_debugger_cmd( rtems_monitor_debugger_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
@@ -270,7 +270,7 @@ void
rtems_monitor_pause_cmd( rtems_monitor_pause_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
@@ -284,12 +284,12 @@ void
rtems_monitor_fatal_cmd( rtems_monitor_fatal_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
if (argc == 1) if (argc == 1)
rtems_fatal_error_occurred(command_arg); rtems_fatal_error_occurred(command_arg->status_code);
else else
rtems_fatal_error_occurred(strtoul(argv[1], 0, 0)); rtems_fatal_error_occurred(strtoul(argv[1], 0, 0));
} }
@@ -298,7 +298,7 @@ void
rtems_monitor_continue_cmd( rtems_monitor_continue_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
@@ -309,7 +309,7 @@ void
rtems_monitor_node_cmd( rtems_monitor_node_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
@@ -530,7 +530,7 @@ rtems_monitor_task(
continue; continue;
} }
command->command_function(argc, argv, command->command_arg, verbose); command->command_function(argc, argv, &command->command_arg, verbose);
fflush(stdout); fflush(stdout);
} }

View File

@@ -315,16 +315,16 @@ void
rtems_monitor_object_cmd( rtems_monitor_object_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose boolean verbose
) )
{ {
int arg; int arg;
rtems_monitor_object_info_t *info = 0; rtems_monitor_object_info_t *info = 0;
rtems_monitor_object_type_t type = (rtems_monitor_object_type_t) command_arg; rtems_monitor_object_type_t type ;
/* what is the default type? */ /* what is the default type? */
type = (rtems_monitor_object_type_t) command_arg; type = command_arg->monitor_object;
if (argc == 1) if (argc == 1)
{ {

View File

@@ -452,14 +452,14 @@ void
rtems_monitor_symbol_cmd( rtems_monitor_symbol_cmd(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t* command_arg,
boolean verbose boolean verbose
) )
{ {
int arg; int arg;
rtems_symbol_table_t *table; rtems_symbol_table_t *table;
table = *(rtems_symbol_table_t **) command_arg; table = *command_arg->symbol_table;
if (table == 0) if (table == 0)
{ {
table = rtems_monitor_symbols; table = rtems_monitor_symbols;

View File

@@ -284,18 +284,21 @@ extern unsigned32 rtems_monitor_default_node; /* current default for commands *
*/ */
typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t; typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t;
typedef union _rtems_monitor_command_arg_t rtems_monitor_command_arg_t;
/* FIXME: This should not be here */
extern rtems_monitor_command_entry_t rtems_monitor_commands[];
typedef void ( *rtems_monitor_command_function_t )( typedef void ( *rtems_monitor_command_function_t )(
int argc, int argc,
char **argv, char **argv,
unsigned32 command_arg, rtems_monitor_command_arg_t *command_arg,
boolean verbose boolean verbose
); );
typedef unsigned32 rtems_monitor_command_arg_t; union _rtems_monitor_command_arg_t {
rtems_monitor_object_type_t monitor_object ;
rtems_status_code status_code ;
rtems_symbol_table_t **symbol_table ;
rtems_monitor_command_entry_t *monitor_command_entry ;
};
struct rtems_monitor_command_entry_s { struct rtems_monitor_command_entry_s {
char *command; /* command name */ char *command; /* command name */
@@ -307,6 +310,7 @@ struct rtems_monitor_command_entry_s {
rtems_monitor_command_entry_t *next; rtems_monitor_command_entry_t *next;
}; };
typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *); typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *);
typedef void (*rtems_monitor_object_canonical_fn)(void *, void *); typedef void (*rtems_monitor_object_canonical_fn)(void *, void *);
typedef void (*rtems_monitor_object_dump_header_fn)(boolean); typedef void (*rtems_monitor_object_dump_header_fn)(boolean);
@@ -327,11 +331,11 @@ typedef struct {
void rtems_monitor_kill(void); void rtems_monitor_kill(void);
void rtems_monitor_init(unsigned32); void rtems_monitor_init(unsigned32);
void rtems_monitor_wakeup(void); void rtems_monitor_wakeup(void);
void rtems_monitor_pause_cmd(int, char **, unsigned32, boolean); void rtems_monitor_pause_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
void rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean); void rtems_monitor_fatal_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
void rtems_monitor_continue_cmd(int, char **, unsigned32, boolean); void rtems_monitor_continue_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
void rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean); void rtems_monitor_debugger_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
void rtems_monitor_node_cmd(int, char **, unsigned32, boolean); void rtems_monitor_node_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
void rtems_monitor_symbols_loadup(void); void rtems_monitor_symbols_loadup(void);
int rtems_monitor_insert_cmd(rtems_monitor_command_entry_t *); int rtems_monitor_insert_cmd(rtems_monitor_command_entry_t *);
int rtems_monitor_erase_cmd(rtems_monitor_command_entry_t *); int rtems_monitor_erase_cmd(rtems_monitor_command_entry_t *);
@@ -350,7 +354,7 @@ int rtems_monitor_command_read(char *, int *, char **);
rtems_monitor_command_entry_t *rtems_monitor_command_lookup( rtems_monitor_command_entry_t *rtems_monitor_command_lookup(
rtems_monitor_command_entry_t * table, int argc, char **argv); rtems_monitor_command_entry_t * table, int argc, char **argv);
void rtems_monitor_command_usage(rtems_monitor_command_entry_t *, char *); void rtems_monitor_command_usage(rtems_monitor_command_entry_t *, char *);
void rtems_monitor_help_cmd(int, char **, unsigned32, boolean); void rtems_monitor_help_cmd(int, char **, rtems_monitor_command_arg_t *, boolean);
/* prmisc.c */ /* prmisc.c */
void rtems_monitor_separator(void); void rtems_monitor_separator(void);
@@ -373,7 +377,7 @@ rtems_id rtems_monitor_object_canonical_get(rtems_monitor_object_type_t, rtems
rtems_id rtems_monitor_object_canonical_next(rtems_monitor_object_info_t *, rtems_id, void *); rtems_id rtems_monitor_object_canonical_next(rtems_monitor_object_info_t *, rtems_id, void *);
void *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *); void *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *);
rtems_id rtems_monitor_object_canonical(rtems_id, void *); rtems_id rtems_monitor_object_canonical(rtems_id, void *);
void rtems_monitor_object_cmd(int, char **, unsigned32, boolean); void rtems_monitor_object_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
/* manager.c */ /* manager.c */
void *rtems_monitor_manager_next(void *, void *, rtems_id *); void *rtems_monitor_manager_next(void *, void *, rtems_id *);
@@ -438,11 +442,14 @@ void rtems_monitor_symbol_canonical(rtems_monitor_symbol_t *, rtems_symbol_t
void rtems_monitor_symbol_canonical_by_name(rtems_monitor_symbol_t *, char *); void rtems_monitor_symbol_canonical_by_name(rtems_monitor_symbol_t *, char *);
void rtems_monitor_symbol_canonical_by_value(rtems_monitor_symbol_t *, void *); void rtems_monitor_symbol_canonical_by_value(rtems_monitor_symbol_t *, void *);
unsigned32 rtems_monitor_symbol_dump(rtems_monitor_symbol_t *, boolean); unsigned32 rtems_monitor_symbol_dump(rtems_monitor_symbol_t *, boolean);
void rtems_monitor_symbol_cmd(int, char **, unsigned32, boolean); void rtems_monitor_symbol_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
extern rtems_symbol_table_t *rtems_monitor_symbols; extern rtems_symbol_table_t *rtems_monitor_symbols;
/* FIXME: This should not be here */
extern rtems_monitor_command_entry_t rtems_monitor_commands[];
#define MONITOR_WAKEUP_EVENT RTEMS_EVENT_0 #define MONITOR_WAKEUP_EVENT RTEMS_EVENT_0
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -473,7 +473,7 @@ int main_monitor(int argc,char * argv[]) {
rtems_monitor_node = rtems_get_node(rtems_monitor_task_id); rtems_monitor_node = rtems_get_node(rtems_monitor_task_id);
rtems_monitor_default_node = rtems_monitor_node; rtems_monitor_default_node = rtems_monitor_node;
if ((command=rtems_monitor_command_lookup(rtems_monitor_commands,argc,argv))) 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; return 0;
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/