Changeset d4c4078 in rtems


Ignore:
Timestamp:
Sep 26, 2003, 5:42:45 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5ca5a54
Parents:
1f5a1afe
Message:

2003-09-26 Ralf Corsepius <corsepiu@…>

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.
Location:
cpukit/libmisc
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/ChangeLog

    r1f5a1afe rd4c4078  
     12003-09-26      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        PR 495/rtems_misc
     4        * capture/capture-cli.c, monitor/mon-command.c, monitor/mon-config.c,
     5        monitor/mon-monitor.c, monitor/mon-object.c, monitor/mon-symbols.c,
     6        monitor/monitor.h, shell/cmds.c: Move to making libmisc 16/32 bit
     7        clean.
     8
    192003-09-22      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    210
  • cpukit/libmisc/capture/capture-cli.c

    r1f5a1afe rd4c4078  
    6666  int argc,
    6767  char **argv,
    68   unsigned32 command_arg,
     68  rtems_monitor_command_arg_t *command_arg,
    6969  boolean verbose )
    7070{
     
    138138  int argc,
    139139  char **argv,
    140   unsigned32 command_arg,
     140  rtems_monitor_command_arg_t *command_arg,
    141141  boolean verbose )
    142142{
     
    167167  int argc,
    168168  char **argv,
    169   unsigned32 command_arg,
     169  rtems_monitor_command_arg_t *command_arg,
    170170  boolean verbose )
    171171{
     
    196196  int argc,
    197197  char **argv,
    198   unsigned32 command_arg,
     198  rtems_monitor_command_arg_t *command_arg,
    199199  boolean verbose )
    200200{
     
    225225  int argc,
    226226  char **argv,
    227   unsigned32 command_arg,
     227  rtems_monitor_command_arg_t *command_arg,
    228228  boolean verbose )
    229229{
     
    461461  int argc,
    462462  char **argv,
    463   unsigned32 command_arg,
     463  rtems_monitor_command_arg_t *command_arg,
    464464  boolean verbose )
    465465{
     
    532532  int argc,
    533533  char **argv,
    534   unsigned32 command_arg,
     534  rtems_monitor_command_arg_t *command_arg,
    535535  boolean verbose )
    536536{
     
    658658  int argc,
    659659  char **argv,
    660   unsigned32 command_arg,
     660  rtems_monitor_command_arg_t *command_arg,
    661661  boolean verbose )
    662662{
     
    720720  int argc,
    721721  char **argv,
    722   unsigned32 command_arg,
     722  rtems_monitor_command_arg_t *command_arg,
    723723  boolean verbose )
    724724{
     
    781781  int argc,
    782782  char **argv,
    783   unsigned32 command_arg,
     783  rtems_monitor_command_arg_t *command_arg,
    784784  boolean verbose )
    785785{
     
    847847  int argc,
    848848  char **argv,
    849   unsigned32 command_arg,
     849  rtems_monitor_command_arg_t *command_arg,
    850850  boolean verbose )
    851851{
     
    901901  int argc,
    902902  char **argv,
    903   unsigned32 command_arg,
     903  rtems_monitor_command_arg_t *command_arg,
    904904  boolean verbose )
    905905{
     
    952952  int argc,
    953953  char **argv,
    954   unsigned32 command_arg,
     954  rtems_monitor_command_arg_t *command_arg,
    955955  boolean verbose )
    956956{
     
    10031003  int argc,
    10041004  char **argv,
    1005   unsigned32 command_arg,
     1005  rtems_monitor_command_arg_t *command_arg,
    10061006  boolean verbose )
    10071007{
     
    11591159  int argc,
    11601160  char **argv,
    1161   unsigned32 command_arg,
     1161  rtems_monitor_command_arg_t *command_arg,
    11621162  boolean verbose )
    11631163{
     
    12841284  int argc,
    12851285  char **argv,
    1286   unsigned32 command_arg,
     1286  rtems_monitor_command_arg_t *command_arg,
    12871287  boolean verbose )
    12881288{
  • cpukit/libmisc/monitor/mon-command.c

    r1f5a1afe rd4c4078  
    573573}
    574574
    575 void
     575static void
    576576rtems_monitor_show_help (
    577577  rtems_monitor_command_entry_t *help_cmd,
     
    727727    int          argc,
    728728    char       **argv,
    729     unsigned32   command_arg,
     729    rtems_monitor_command_arg_t *command_arg,
    730730    boolean verbose
    731731)
     
    734734  rtems_monitor_command_entry_t *command;
    735735
    736   command = (rtems_monitor_command_entry_t *) command_arg;
     736  command = command_arg->monitor_command_entry;
    737737   
    738738  if (argc == 1)
  • cpukit/libmisc/monitor/mon-config.c

    r1f5a1afe rd4c4078  
    104104    length += printf("WORKSPACE");
    105105    length += rtems_monitor_pad(DATACOL, length);
    106     length += printf("start: 0x%x;  size: 0x%x\n",
    107                      (unsigned32) monitor_config->work_space_start,
     106    length += printf("start: %p;  size: 0x%x\n",
     107                     monitor_config->work_space_start,
    108108                     monitor_config->work_space_size);
    109109
  • cpukit/libmisc/monitor/mon-monitor.c

    r1f5a1afe rd4c4078  
    7676      0,
    7777      rtems_monitor_object_cmd,
    78       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_CONFIG,
     78      { RTEMS_MONITOR_OBJECT_CONFIG },
    7979      &rtems_monitor_commands[1],
    8080    },
     
    8383      0,
    8484      rtems_monitor_object_cmd,
    85       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INIT_TASK,
     85      { RTEMS_MONITOR_OBJECT_INIT_TASK },
    8686      &rtems_monitor_commands[2],
    8787    },
     
    9090      0,
    9191      rtems_monitor_object_cmd,
    92       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_MPCI,
     92      { RTEMS_MONITOR_OBJECT_MPCI },
    9393      &rtems_monitor_commands[3],
    9494    },
     
    9999      0,
    100100      rtems_monitor_pause_cmd,
    101       0,
     101      { 0 },
    102102      &rtems_monitor_commands[4],
    103103    },
     
    107107      0,
    108108      rtems_monitor_continue_cmd,
    109       0,
     109      { 0 },
    110110      &rtems_monitor_commands[5],
    111111    },
     
    114114      0,
    115115      rtems_monitor_continue_cmd,
    116       0,
     116      { 0 },
    117117      &rtems_monitor_commands[6],
    118118    },
     
    122122      0,
    123123      rtems_monitor_node_cmd,
    124       0,
     124      { 0 },
    125125      &rtems_monitor_commands[7],
    126126    },
     
    131131      0,
    132132      rtems_monitor_symbol_cmd,
    133       (rtems_monitor_command_arg_t) &rtems_monitor_symbols,
     133      { .symbol_table = &rtems_monitor_symbols },
    134134      &rtems_monitor_commands[8],
    135135    },
     
    140140      0,
    141141      rtems_monitor_object_cmd,
    142       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_EXTENSION,
     142      { RTEMS_MONITOR_OBJECT_EXTENSION },
    143143      &rtems_monitor_commands[9],
    144144    },
     
    149149      0,
    150150      rtems_monitor_object_cmd,
    151       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_TASK,
     151      { RTEMS_MONITOR_OBJECT_TASK },
    152152      &rtems_monitor_commands[10],
    153153    },
     
    158158      0,
    159159      rtems_monitor_object_cmd,
    160       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_QUEUE,
     160      { RTEMS_MONITOR_OBJECT_QUEUE },
    161161      &rtems_monitor_commands[11],
    162162    },
     
    168168      0,
    169169      rtems_monitor_object_cmd,
    170       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_INVALID,
     170      { RTEMS_MONITOR_OBJECT_INVALID },
    171171      &rtems_monitor_commands[12],
    172172    },
     
    176176      0,
    177177      rtems_monitor_object_cmd,
    178       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DRIVER,
     178      { RTEMS_MONITOR_OBJECT_DRIVER },
    179179      &rtems_monitor_commands[13],
    180180    },
     
    183183      0,
    184184      rtems_monitor_object_cmd,
    185       (rtems_monitor_command_arg_t) RTEMS_MONITOR_OBJECT_DNAME,
     185      { RTEMS_MONITOR_OBJECT_DNAME },
    186186      &rtems_monitor_commands[14],
    187187    },
     
    192192      0,
    193193      rtems_monitor_fatal_cmd,
    194       (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,
     194      { .status_code = RTEMS_SUCCESSFUL },
    195195      &rtems_monitor_commands[15],
    196196    },
     
    200200      0,
    201201      rtems_monitor_fatal_cmd,
    202       (rtems_monitor_command_arg_t) RTEMS_TASK_EXITTED,         /* exit value */
     202      { .status_code = RTEMS_TASK_EXITTED },            /* exit value */
    203203      &rtems_monitor_commands[16],
    204204    },
     
    207207      0,
    208208      rtems_monitor_fatal_cmd,
    209       (rtems_monitor_command_arg_t) RTEMS_SUCCESSFUL,                           /* exit value */
     209      { .status_code = RTEMS_SUCCESSFUL },              /* exit value */
    210210      &rtems_monitor_commands[17],
    211211    },
     
    216216      0,
    217217      rtems_monitor_help_cmd,
    218       (rtems_monitor_command_arg_t) rtems_monitor_commands,
     218      { .monitor_command_entry = rtems_monitor_commands },
    219219      &rtems_monitor_commands[18],
    220220    },
     
    225225      0,
    226226      rtems_monitor_debugger_cmd,
    227       0,
     227      { 0 },
    228228      &rtems_monitor_commands[19],
    229229    },
    230230#endif           
    231     { 0, 0, 0, 0, 0, &rtems_registered_commands },
     231    { 0, 0, 0, 0, { 0 }, &rtems_registered_commands },
    232232};
    233233
     
    258258    int        argc,
    259259    char     **argv,
    260     unsigned32 command_arg,
     260    rtems_monitor_command_arg_t* command_arg,
    261261    boolean    verbose
    262262)
     
    271271    int        argc,
    272272    char     **argv,
    273     unsigned32 command_arg,
     273    rtems_monitor_command_arg_t* command_arg,
    274274    boolean    verbose
    275275)
     
    285285    int     argc,
    286286    char  **argv,
    287     unsigned32 command_arg,
     287    rtems_monitor_command_arg_t* command_arg,
    288288    boolean verbose
    289289)
    290290{
    291291    if (argc == 1)
    292         rtems_fatal_error_occurred(command_arg);
     292        rtems_fatal_error_occurred(command_arg->status_code);
    293293    else
    294294        rtems_fatal_error_occurred(strtoul(argv[1], 0, 0));
     
    299299    int     argc,
    300300    char  **argv,
    301     unsigned32 command_arg,
     301    rtems_monitor_command_arg_t* command_arg,
    302302    boolean verbose
    303303)
     
    310310    int     argc,
    311311    char  **argv,
    312     unsigned32 command_arg,
     312    rtems_monitor_command_arg_t* command_arg,
    313313    boolean verbose
    314314)
     
    531531        }
    532532
    533         command->command_function(argc, argv, command->command_arg, verbose);
     533        command->command_function(argc, argv, &command->command_arg, verbose);
    534534
    535535        fflush(stdout);
  • cpukit/libmisc/monitor/mon-object.c

    r1f5a1afe rd4c4078  
    316316    int        argc,
    317317    char     **argv,
    318     unsigned32 command_arg,
     318    rtems_monitor_command_arg_t *command_arg,
    319319    boolean    verbose
    320320)
     
    322322    int arg;
    323323    rtems_monitor_object_info_t *info = 0;
    324     rtems_monitor_object_type_t  type = (rtems_monitor_object_type_t) command_arg;
     324    rtems_monitor_object_type_t  type ;
    325325   
    326326    /* what is the default type? */
    327     type = (rtems_monitor_object_type_t) command_arg;
     327    type = command_arg->monitor_object;
    328328
    329329    if (argc == 1)
  • cpukit/libmisc/monitor/mon-symbols.c

    r1f5a1afe rd4c4078  
    453453    int        argc,
    454454    char     **argv,
    455     unsigned32 command_arg,
     455    rtems_monitor_command_arg_t* command_arg,
    456456    boolean    verbose
    457457)
     
    460460    rtems_symbol_table_t *table;
    461461
    462     table = *(rtems_symbol_table_t **) command_arg;
     462    table = *command_arg->symbol_table;
    463463    if (table == 0)
    464464    {
  • cpukit/libmisc/monitor/monitor.h

    r1f5a1afe rd4c4078  
    285285
    286286typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t;
    287 
    288 /* FIXME: This should not be here */
    289 extern rtems_monitor_command_entry_t rtems_monitor_commands[];
     287typedef union _rtems_monitor_command_arg_t   rtems_monitor_command_arg_t;
    290288
    291289typedef void ( *rtems_monitor_command_function_t )(
    292290                 int         argc,
    293291                 char      **argv,
    294                  unsigned32  command_arg,
     292                 rtems_monitor_command_arg_t *command_arg,
    295293                 boolean     verbose
    296294             );
    297295
    298 typedef unsigned32   rtems_monitor_command_arg_t;
     296union _rtems_monitor_command_arg_t {
     297  rtems_monitor_object_type_t   monitor_object ;
     298  rtems_status_code             status_code ;
     299  rtems_symbol_table_t          **symbol_table ;
     300  rtems_monitor_command_entry_t *monitor_command_entry ;
     301};
    299302
    300303struct rtems_monitor_command_entry_s {
     
    308311};
    309312
     313
    310314typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *);
    311315typedef void (*rtems_monitor_object_canonical_fn)(void *, void *);
     
    328332void    rtems_monitor_init(unsigned32);
    329333void    rtems_monitor_wakeup(void);
    330 void    rtems_monitor_pause_cmd(int, char **, unsigned32, boolean);
    331 void    rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean);
    332 void    rtems_monitor_continue_cmd(int, char **, unsigned32, boolean);
    333 void    rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean);
    334 void    rtems_monitor_node_cmd(int, char **, unsigned32, boolean);
     334void    rtems_monitor_pause_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
     335void    rtems_monitor_fatal_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
     336void    rtems_monitor_continue_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
     337void    rtems_monitor_debugger_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
     338void    rtems_monitor_node_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
    335339void    rtems_monitor_symbols_loadup(void);
    336340int     rtems_monitor_insert_cmd(rtems_monitor_command_entry_t *);
     
    351355    rtems_monitor_command_entry_t * table, int argc, char **argv);
    352356void    rtems_monitor_command_usage(rtems_monitor_command_entry_t *, char *);
    353 void    rtems_monitor_help_cmd(int, char **, unsigned32, boolean);
     357void    rtems_monitor_help_cmd(int, char **, rtems_monitor_command_arg_t *, boolean);
    354358
    355359/* prmisc.c */
     
    374378void      *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *);
    375379rtems_id   rtems_monitor_object_canonical(rtems_id, void *);
    376 void       rtems_monitor_object_cmd(int, char **, unsigned32, boolean);
     380void       rtems_monitor_object_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
    377381
    378382/* manager.c */
     
    439443void    rtems_monitor_symbol_canonical_by_value(rtems_monitor_symbol_t *, void *);
    440444unsigned32 rtems_monitor_symbol_dump(rtems_monitor_symbol_t *, boolean);
    441 void    rtems_monitor_symbol_cmd(int, char **, unsigned32, boolean);
     445void    rtems_monitor_symbol_cmd(int, char **, rtems_monitor_command_arg_t*, boolean);
    442446
    443447
    444448extern rtems_symbol_table_t *rtems_monitor_symbols;
     449
     450/* FIXME: This should not be here */
     451extern rtems_monitor_command_entry_t rtems_monitor_commands[];
    445452
    446453#define MONITOR_WAKEUP_EVENT   RTEMS_EVENT_0
  • cpukit/libmisc/shell/cmds.c

    r1f5a1afe rd4c4078  
    474474 rtems_monitor_default_node = rtems_monitor_node;
    475475 if ((command=rtems_monitor_command_lookup(rtems_monitor_commands,argc,argv)))
    476   command->command_function(argc, argv, command->command_arg, 0);
     476  command->command_function(argc, argv, &command->command_arg, 0);
    477477 return 0;
    478478}
Note: See TracChangeset for help on using the changeset viewer.