[cbd7691] | 1 | /** |
---|
| 2 | * @file rtems/monitor.h |
---|
[8389628] | 3 | * |
---|
[cbd7691] | 4 | * The RTEMS monitor task. |
---|
| 5 | */ |
---|
[33c3b54d] | 6 | |
---|
[cbd7691] | 7 | /* |
---|
[8389628] | 8 | * $Id$ |
---|
[ac7d5ef0] | 9 | */ |
---|
| 10 | |
---|
| 11 | #ifndef __MONITOR_H |
---|
| 12 | #define __MONITOR_H |
---|
| 13 | |
---|
[7417f7b7] | 14 | #include <rtems/error.h> /* rtems_error() */ |
---|
[15a47934] | 15 | #include <rtems/config.h> |
---|
[b06e68ef] | 16 | |
---|
[ac7d5ef0] | 17 | #ifdef __cplusplus |
---|
| 18 | extern "C" { |
---|
| 19 | #endif |
---|
| 20 | |
---|
[e7f38e8] | 21 | /* Forward decls from symbols.h */ |
---|
[70443b40] | 22 | typedef struct _rtems_symbol_t rtems_symbol_t; |
---|
[e7f38e8] | 23 | typedef struct _rtems_symbol_table_t rtems_symbol_table_t; |
---|
| 24 | |
---|
[b06e68ef] | 25 | /* |
---|
[8389628] | 26 | * Monitor types are derived from rtems object classes |
---|
[b06e68ef] | 27 | */ |
---|
| 28 | |
---|
| 29 | typedef enum { |
---|
[6a07436] | 30 | RTEMS_MONITOR_OBJECT_INVALID = OBJECTS_CLASSIC_NO_CLASS, |
---|
[72c440e] | 31 | RTEMS_MONITOR_OBJECT_TASK = OBJECTS_RTEMS_TASKS, |
---|
| 32 | RTEMS_MONITOR_OBJECT_EXTENSION = OBJECTS_RTEMS_EXTENSIONS, |
---|
| 33 | RTEMS_MONITOR_OBJECT_QUEUE = OBJECTS_RTEMS_MESSAGE_QUEUES, |
---|
| 34 | RTEMS_MONITOR_OBJECT_SEMAPHORE = OBJECTS_RTEMS_SEMAPHORES, |
---|
| 35 | RTEMS_MONITOR_OBJECT_PARTITION = OBJECTS_RTEMS_PARTITIONS, |
---|
| 36 | RTEMS_MONITOR_OBJECT_REGION = OBJECTS_RTEMS_REGIONS, |
---|
| 37 | RTEMS_MONITOR_OBJECT_PORT = OBJECTS_RTEMS_PORTS, |
---|
| 38 | |
---|
| 39 | /* following monitor objects are not known to RTEMS, but |
---|
| 40 | * we like to have "types" for them anyway */ |
---|
[aed742c] | 41 | |
---|
[63977bb4] | 42 | RTEMS_MONITOR_OBJECT_DRIVER = OBJECTS_RTEMS_CLASSES_LAST+1, |
---|
[72c440e] | 43 | RTEMS_MONITOR_OBJECT_DNAME, |
---|
| 44 | RTEMS_MONITOR_OBJECT_CONFIG, |
---|
| 45 | RTEMS_MONITOR_OBJECT_INIT_TASK, |
---|
| 46 | RTEMS_MONITOR_OBJECT_MPCI, |
---|
[00a2d366] | 47 | RTEMS_MONITOR_OBJECT_SYMBOL, |
---|
| 48 | #if defined(RTEMS_POSIX_API) |
---|
| 49 | RTEMS_MONITOR_OBJECT_PTHREAD, |
---|
| 50 | #endif |
---|
[72c440e] | 51 | } rtems_monitor_object_type_t; |
---|
[b06e68ef] | 52 | |
---|
| 53 | /* |
---|
| 54 | * rtems_monitor_init() flags |
---|
| 55 | */ |
---|
| 56 | |
---|
| 57 | #define RTEMS_MONITOR_SUSPEND 0x0001 /* suspend monitor on startup */ |
---|
| 58 | #define RTEMS_MONITOR_GLOBAL 0x0002 /* monitor should be global */ |
---|
[70443b40] | 59 | #define RTEMS_MONITOR_NOTASK 0x0004 /* do not start monitor task */ |
---|
| 60 | #define RTEMS_MONITOR_NOSYMLOAD 0x0008 /* do not load symbols */ |
---|
| 61 | #define RTEMS_MONITOR_WAITQUIT 0x0010 /* wait for monitor task to terminate */ |
---|
[b06e68ef] | 62 | |
---|
| 63 | /* |
---|
| 64 | * Public interfaces for RTEMS data structures monitor is aware of. |
---|
| 65 | * These are only used by the monitor. |
---|
| 66 | * |
---|
| 67 | * NOTE: |
---|
| 68 | * All the canonical objects that correspond to RTEMS managed "objects" |
---|
| 69 | * must have an identical first portion with 'id' and 'name' fields. |
---|
| 70 | * |
---|
| 71 | * Others do not have that restriction, even tho we would like them to. |
---|
| 72 | * This is because some of the canonical structures are almost too big |
---|
| 73 | * for shared memory driver (eg: mpci) and we are nickel and diming it. |
---|
| 74 | */ |
---|
| 75 | |
---|
| 76 | /* |
---|
| 77 | * Type of a pointer that may be a symbol |
---|
| 78 | */ |
---|
[aed742c] | 79 | |
---|
[b06e68ef] | 80 | #define MONITOR_SYMBOL_LEN 20 |
---|
| 81 | typedef struct { |
---|
| 82 | char name[MONITOR_SYMBOL_LEN]; |
---|
[3e08d4e] | 83 | uint32_t value; |
---|
| 84 | uint32_t offset; |
---|
[aed742c] | 85 | } rtems_monitor_symbol_t; |
---|
[b06e68ef] | 86 | |
---|
| 87 | typedef struct { |
---|
| 88 | rtems_id id; |
---|
| 89 | rtems_name name; |
---|
| 90 | /* end of common portion */ |
---|
[aed742c] | 91 | } rtems_monitor_generic_t; |
---|
[b06e68ef] | 92 | |
---|
| 93 | /* |
---|
| 94 | * Task |
---|
| 95 | */ |
---|
| 96 | typedef struct { |
---|
[3b14b7ad] | 97 | rtems_id id; |
---|
| 98 | rtems_name name; |
---|
[b06e68ef] | 99 | /* end of common portion */ |
---|
[3b14b7ad] | 100 | Thread_Entry entry; |
---|
| 101 | Thread_Entry_numeric_type argument; |
---|
| 102 | void *stack; |
---|
| 103 | uint32_t stack_size; |
---|
| 104 | rtems_task_priority priority; |
---|
| 105 | States_Control state; |
---|
| 106 | rtems_event_set events; |
---|
| 107 | rtems_mode modes; |
---|
| 108 | rtems_attribute attributes; |
---|
| 109 | uint32_t notepad[RTEMS_NUMBER_NOTEPADS]; |
---|
| 110 | rtems_id wait_id; |
---|
| 111 | uint32_t wait_args; |
---|
| 112 | uint32_t ticks; |
---|
[b06e68ef] | 113 | } rtems_monitor_task_t; |
---|
| 114 | |
---|
| 115 | /* |
---|
| 116 | * Init task |
---|
| 117 | */ |
---|
| 118 | |
---|
| 119 | typedef struct { |
---|
| 120 | rtems_id id; /* not really an id */ |
---|
| 121 | rtems_name name; |
---|
| 122 | /* end of common portion */ |
---|
| 123 | rtems_monitor_symbol_t entry; |
---|
[3e08d4e] | 124 | uint32_t argument; |
---|
| 125 | uint32_t stack_size; |
---|
[b06e68ef] | 126 | rtems_task_priority priority; |
---|
| 127 | rtems_mode modes; |
---|
| 128 | rtems_attribute attributes; |
---|
| 129 | } rtems_monitor_init_task_t; |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | /* |
---|
| 133 | * Message queue |
---|
| 134 | */ |
---|
| 135 | typedef struct { |
---|
| 136 | rtems_id id; |
---|
| 137 | rtems_name name; |
---|
| 138 | /* end of common portion */ |
---|
| 139 | rtems_attribute attributes; |
---|
[3e08d4e] | 140 | uint32_t number_of_pending_messages; |
---|
| 141 | uint32_t maximum_pending_messages; |
---|
[f773c012] | 142 | size_t maximum_message_size; |
---|
[b06e68ef] | 143 | } rtems_monitor_queue_t; |
---|
| 144 | |
---|
[501ab691] | 145 | /* |
---|
| 146 | * Semaphore |
---|
| 147 | */ |
---|
| 148 | typedef struct { |
---|
| 149 | rtems_id id; |
---|
| 150 | rtems_name name; |
---|
| 151 | /* end of common portion */ |
---|
| 152 | rtems_attribute attribute; |
---|
| 153 | rtems_task_priority priority_ceiling; |
---|
| 154 | uint32_t max_count; |
---|
| 155 | uint32_t cur_count; |
---|
| 156 | rtems_id holder_id; |
---|
| 157 | } rtems_monitor_sema_t; |
---|
| 158 | |
---|
[b06e68ef] | 159 | /* |
---|
| 160 | * Extension |
---|
| 161 | */ |
---|
| 162 | typedef struct { |
---|
| 163 | rtems_id id; |
---|
| 164 | rtems_name name; |
---|
| 165 | /* end of common portion */ |
---|
[11290355] | 166 | rtems_monitor_symbol_t e_create; |
---|
| 167 | rtems_monitor_symbol_t e_start; |
---|
| 168 | rtems_monitor_symbol_t e_restart; |
---|
| 169 | rtems_monitor_symbol_t e_delete; |
---|
| 170 | rtems_monitor_symbol_t e_tswitch; |
---|
| 171 | rtems_monitor_symbol_t e_begin; |
---|
| 172 | rtems_monitor_symbol_t e_exitted; |
---|
| 173 | rtems_monitor_symbol_t e_fatal; |
---|
[b06e68ef] | 174 | } rtems_monitor_extension_t; |
---|
| 175 | |
---|
[501ab691] | 176 | /* |
---|
| 177 | * Region |
---|
| 178 | */ |
---|
| 179 | typedef struct { |
---|
| 180 | rtems_id id; |
---|
| 181 | rtems_name name; |
---|
| 182 | /* end of common portion */ |
---|
| 183 | rtems_attribute attribute; |
---|
| 184 | void * start_addr; |
---|
| 185 | uint32_t length; |
---|
| 186 | uint32_t page_size; |
---|
| 187 | uint32_t max_seg_size; |
---|
| 188 | uint32_t used_blocks; |
---|
| 189 | } rtems_monitor_region_t; |
---|
| 190 | |
---|
| 191 | /* |
---|
| 192 | * Partition |
---|
| 193 | */ |
---|
| 194 | typedef struct { |
---|
| 195 | rtems_id id; |
---|
| 196 | rtems_name name; |
---|
| 197 | /* end of common portion */ |
---|
| 198 | rtems_attribute attribute; |
---|
| 199 | void * start_addr; |
---|
| 200 | uint32_t length; |
---|
| 201 | uint32_t buf_size; |
---|
| 202 | uint32_t used_blocks; |
---|
| 203 | } rtems_monitor_part_t; |
---|
| 204 | |
---|
[b06e68ef] | 205 | /* |
---|
| 206 | * Device driver |
---|
| 207 | */ |
---|
| 208 | |
---|
| 209 | typedef struct { |
---|
| 210 | rtems_id id; /* not really an id (should be tho) */ |
---|
| 211 | rtems_name name; /* ditto */ |
---|
| 212 | /* end of common portion */ |
---|
| 213 | rtems_monitor_symbol_t initialization; /* initialization procedure */ |
---|
| 214 | rtems_monitor_symbol_t open; /* open request procedure */ |
---|
| 215 | rtems_monitor_symbol_t close; /* close request procedure */ |
---|
| 216 | rtems_monitor_symbol_t read; /* read request procedure */ |
---|
| 217 | rtems_monitor_symbol_t write; /* write request procedure */ |
---|
| 218 | rtems_monitor_symbol_t control; /* special functions procedure */ |
---|
| 219 | } rtems_monitor_driver_t; |
---|
| 220 | |
---|
| 221 | /* |
---|
| 222 | * System config |
---|
| 223 | */ |
---|
| 224 | |
---|
| 225 | typedef struct { |
---|
| 226 | void *work_space_start; |
---|
[3e08d4e] | 227 | uint32_t work_space_size; |
---|
| 228 | uint32_t maximum_tasks; |
---|
| 229 | uint32_t maximum_timers; |
---|
| 230 | uint32_t maximum_semaphores; |
---|
| 231 | uint32_t maximum_message_queues; |
---|
| 232 | uint32_t maximum_partitions; |
---|
| 233 | uint32_t maximum_regions; |
---|
| 234 | uint32_t maximum_ports; |
---|
| 235 | uint32_t maximum_periods; |
---|
| 236 | uint32_t maximum_extensions; |
---|
| 237 | uint32_t microseconds_per_tick; |
---|
| 238 | uint32_t ticks_per_timeslice; |
---|
| 239 | uint32_t number_of_initialization_tasks; |
---|
[b06e68ef] | 240 | } rtems_monitor_config_t; |
---|
| 241 | |
---|
| 242 | /* |
---|
| 243 | * MPCI config |
---|
| 244 | */ |
---|
| 245 | |
---|
[97e2729d] | 246 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[b06e68ef] | 247 | typedef struct { |
---|
[3e08d4e] | 248 | uint32_t node; /* local node number */ |
---|
| 249 | uint32_t maximum_nodes; /* maximum # nodes in system */ |
---|
| 250 | uint32_t maximum_global_objects; /* maximum # global objects */ |
---|
| 251 | uint32_t maximum_proxies; /* maximum # proxies */ |
---|
[b06e68ef] | 252 | |
---|
[3e08d4e] | 253 | uint32_t default_timeout; /* in ticks */ |
---|
[f773c012] | 254 | size_t maximum_packet_size; |
---|
[b06e68ef] | 255 | rtems_monitor_symbol_t initialization; |
---|
| 256 | rtems_monitor_symbol_t get_packet; |
---|
| 257 | rtems_monitor_symbol_t return_packet; |
---|
| 258 | rtems_monitor_symbol_t send_packet; |
---|
| 259 | rtems_monitor_symbol_t receive_packet; |
---|
| 260 | } rtems_monitor_mpci_t; |
---|
[97e2729d] | 261 | #endif |
---|
[b06e68ef] | 262 | |
---|
| 263 | /* |
---|
| 264 | * The generic canonical information union |
---|
| 265 | */ |
---|
| 266 | |
---|
| 267 | typedef union { |
---|
| 268 | rtems_monitor_generic_t generic; |
---|
| 269 | rtems_monitor_task_t task; |
---|
| 270 | rtems_monitor_queue_t queue; |
---|
[501ab691] | 271 | rtems_monitor_sema_t sema; |
---|
[b06e68ef] | 272 | rtems_monitor_extension_t extension; |
---|
| 273 | rtems_monitor_driver_t driver; |
---|
| 274 | rtems_monitor_config_t config; |
---|
[501ab691] | 275 | rtems_monitor_region_t region; |
---|
| 276 | rtems_monitor_part_t part; |
---|
[97e2729d] | 277 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[b06e68ef] | 278 | rtems_monitor_mpci_t mpci; |
---|
[97e2729d] | 279 | #endif |
---|
[b06e68ef] | 280 | rtems_monitor_init_task_t itask; |
---|
| 281 | } rtems_monitor_union_t; |
---|
| 282 | |
---|
| 283 | /* |
---|
| 284 | * Support for talking to other monitors |
---|
| 285 | */ |
---|
| 286 | |
---|
| 287 | /* |
---|
| 288 | * Names of other monitors |
---|
| 289 | */ |
---|
| 290 | |
---|
| 291 | #define RTEMS_MONITOR_NAME (rtems_build_name('R', 'M', 'O', 'N')) |
---|
| 292 | #define RTEMS_MONITOR_SERVER_NAME (rtems_build_name('R', 'M', 'S', 'V')) |
---|
| 293 | #define RTEMS_MONITOR_QUEUE_NAME (rtems_build_name('R', 'M', 'S', 'Q')) |
---|
| 294 | #define RTEMS_MONITOR_RESPONSE_QUEUE_NAME (rtems_build_name('R', 'M', 'R', 'Q')) |
---|
| 295 | |
---|
| 296 | #define RTEMS_MONITOR_SERVER_RESPONSE 0x0001 |
---|
| 297 | #define RTEMS_MONITOR_SERVER_CANONICAL 0x0002 |
---|
| 298 | |
---|
| 299 | typedef struct |
---|
| 300 | { |
---|
[3e08d4e] | 301 | uint32_t command; |
---|
[b06e68ef] | 302 | rtems_id return_id; |
---|
[3e08d4e] | 303 | uint32_t argument0; |
---|
| 304 | uint32_t argument1; |
---|
| 305 | uint32_t argument2; |
---|
| 306 | uint32_t argument3; |
---|
| 307 | uint32_t argument4; |
---|
| 308 | uint32_t argument5; |
---|
[b06e68ef] | 309 | } rtems_monitor_server_request_t; |
---|
| 310 | |
---|
| 311 | typedef struct |
---|
| 312 | { |
---|
[3e08d4e] | 313 | uint32_t command; |
---|
| 314 | uint32_t result0; |
---|
| 315 | uint32_t result1; |
---|
[b06e68ef] | 316 | rtems_monitor_union_t payload; |
---|
| 317 | } rtems_monitor_server_response_t; |
---|
| 318 | |
---|
| 319 | extern rtems_id rtems_monitor_task_id; |
---|
| 320 | |
---|
[3e08d4e] | 321 | extern uint32_t rtems_monitor_node; /* our node number */ |
---|
| 322 | extern uint32_t rtems_monitor_default_node; /* current default for commands */ |
---|
[b06e68ef] | 323 | |
---|
| 324 | /* |
---|
| 325 | * Monitor command function and table entry |
---|
| 326 | */ |
---|
| 327 | |
---|
| 328 | typedef struct rtems_monitor_command_entry_s rtems_monitor_command_entry_t; |
---|
[d4c4078] | 329 | typedef union _rtems_monitor_command_arg_t rtems_monitor_command_arg_t; |
---|
[c6d35fa5] | 330 | |
---|
[e41eaa88] | 331 | typedef void (*rtems_monitor_command_function_t)( |
---|
| 332 | int argc, |
---|
| 333 | char **argv, |
---|
| 334 | const rtems_monitor_command_arg_t *command_arg, |
---|
| 335 | bool verbose |
---|
| 336 | ); |
---|
[b06e68ef] | 337 | |
---|
[d4c4078] | 338 | union _rtems_monitor_command_arg_t { |
---|
[70443b40] | 339 | rtems_monitor_object_type_t monitor_object; |
---|
| 340 | rtems_status_code status_code; |
---|
| 341 | rtems_symbol_table_t **symbol_table; |
---|
[e41eaa88] | 342 | const rtems_monitor_command_entry_t *monitor_command_entry; |
---|
[d4c4078] | 343 | }; |
---|
[63977bb4] | 344 | |
---|
[b06e68ef] | 345 | struct rtems_monitor_command_entry_s { |
---|
[e41eaa88] | 346 | const char *command; /* command name */ |
---|
| 347 | const char *usage; /* usage string for the command */ |
---|
| 348 | uint32_t arguments_required; /* # of required args */ |
---|
[b06e68ef] | 349 | rtems_monitor_command_function_t command_function; |
---|
| 350 | /* Some argument for the command */ |
---|
[e41eaa88] | 351 | rtems_monitor_command_arg_t command_arg; |
---|
| 352 | const rtems_monitor_command_entry_t *next; |
---|
[b06e68ef] | 353 | }; |
---|
| 354 | |
---|
[d4c4078] | 355 | |
---|
[b06e68ef] | 356 | typedef void *(*rtems_monitor_object_next_fn)(void *, void *, rtems_id *); |
---|
| 357 | typedef void (*rtems_monitor_object_canonical_fn)(void *, void *); |
---|
[2326f0d] | 358 | typedef void (*rtems_monitor_object_dump_header_fn)(bool); |
---|
| 359 | typedef void (*rtems_monitor_object_dump_fn)(void *, bool); |
---|
[b06e68ef] | 360 | |
---|
| 361 | typedef struct { |
---|
[8389628] | 362 | rtems_monitor_object_type_t type; |
---|
[b06e68ef] | 363 | void *object_information; |
---|
| 364 | int size; /* of canonical object */ |
---|
| 365 | rtems_monitor_object_next_fn next; |
---|
| 366 | rtems_monitor_object_canonical_fn canonical; |
---|
| 367 | rtems_monitor_object_dump_header_fn dump_header; |
---|
| 368 | rtems_monitor_object_dump_fn dump; |
---|
| 369 | } rtems_monitor_object_info_t; |
---|
| 370 | |
---|
[eb961961] | 371 | typedef bool (*rtems_monitor_per_command_routine)(const rtems_monitor_command_entry_t *, void *); |
---|
[b06e68ef] | 372 | |
---|
| 373 | /* monitor.c */ |
---|
[e41eaa88] | 374 | void rtems_monitor_pause_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
| 375 | void rtems_monitor_fatal_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
| 376 | void rtems_monitor_continue_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
| 377 | void rtems_monitor_debugger_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
[7417f7b7] | 378 | void rtems_monitor_reset_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
[e41eaa88] | 379 | void rtems_monitor_node_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
[ac7d5ef0] | 380 | void rtems_monitor_symbols_loadup(void); |
---|
[32e2554] | 381 | int rtems_monitor_insert_cmd(rtems_monitor_command_entry_t *); |
---|
[e41eaa88] | 382 | void rtems_monitor_wakeup(void); |
---|
[eb961961] | 383 | void rtems_monitor_command_iterate(rtems_monitor_per_command_routine routine, void *arg); |
---|
[e41eaa88] | 384 | rtems_status_code rtems_monitor_suspend(rtems_interval timeout); |
---|
[32e2554] | 385 | |
---|
[e41eaa88] | 386 | /* editor.c */ |
---|
| 387 | void rtems_monitor_kill(void); |
---|
| 388 | void rtems_monitor_init(uint32_t); |
---|
[b06e68ef] | 389 | void rtems_monitor_task(rtems_task_argument); |
---|
| 390 | |
---|
| 391 | /* server.c */ |
---|
| 392 | void rtems_monitor_server_kill(void); |
---|
[3e08d4e] | 393 | rtems_status_code rtems_monitor_server_request(uint32_t , rtems_monitor_server_request_t *, rtems_monitor_server_response_t *); |
---|
[b06e68ef] | 394 | void rtems_monitor_server_task(rtems_task_argument); |
---|
[3e08d4e] | 395 | void rtems_monitor_server_init(uint32_t ); |
---|
[aed742c] | 396 | |
---|
[b06e68ef] | 397 | /* command.c */ |
---|
| 398 | int rtems_monitor_make_argv(char *, int *, char **); |
---|
| 399 | int rtems_monitor_command_read(char *, int *, char **); |
---|
[e41eaa88] | 400 | void rtems_monitor_command_usage(const rtems_monitor_command_entry_t *, const char *); |
---|
| 401 | void rtems_monitor_help_cmd(int, char **, const rtems_monitor_command_arg_t *, bool); |
---|
[eb961961] | 402 | const rtems_monitor_command_entry_t *rtems_monitor_command_lookup(const char *name); |
---|
[b06e68ef] | 403 | |
---|
| 404 | /* prmisc.c */ |
---|
| 405 | void rtems_monitor_separator(void); |
---|
[3e08d4e] | 406 | uint32_t rtems_monitor_pad(uint32_t dest_col, uint32_t curr_col); |
---|
[c182e2d] | 407 | int rtems_monitor_dump_decimal(uint32_t num); |
---|
| 408 | int rtems_monitor_dump_hex(uint32_t num); |
---|
[5b331cc5] | 409 | int rtems_monitor_dump_addr(void *addr); |
---|
[c182e2d] | 410 | int rtems_monitor_dump_id(rtems_id id); |
---|
[bd5762d] | 411 | int rtems_monitor_dump_name(rtems_id id); |
---|
[c182e2d] | 412 | int rtems_monitor_dump_priority(rtems_task_priority priority); |
---|
| 413 | int rtems_monitor_dump_state(States_Control state); |
---|
| 414 | int rtems_monitor_dump_modes(rtems_mode modes); |
---|
| 415 | int rtems_monitor_dump_attributes(rtems_attribute attributes); |
---|
| 416 | int rtems_monitor_dump_events(rtems_event_set events); |
---|
| 417 | int rtems_monitor_dump_notepad(uint32_t *notepad); |
---|
[b06e68ef] | 418 | |
---|
| 419 | /* object.c */ |
---|
[3e08d4e] | 420 | rtems_id rtems_monitor_id_fixup(rtems_id, uint32_t , rtems_monitor_object_type_t); |
---|
[e41eaa88] | 421 | const rtems_monitor_object_info_t *rtems_monitor_object_lookup(rtems_monitor_object_type_t type); |
---|
[c8b0f1cb] | 422 | rtems_id rtems_monitor_object_canonical_get(rtems_monitor_object_type_t, rtems_id, void *, size_t *size_p); |
---|
[e41eaa88] | 423 | rtems_id rtems_monitor_object_canonical_next(const rtems_monitor_object_info_t *, rtems_id, void *); |
---|
[b06e68ef] | 424 | void *rtems_monitor_object_next(void *, void *, rtems_id, rtems_id *); |
---|
| 425 | rtems_id rtems_monitor_object_canonical(rtems_id, void *); |
---|
[e41eaa88] | 426 | void rtems_monitor_object_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
[b06e68ef] | 427 | |
---|
| 428 | /* manager.c */ |
---|
| 429 | void *rtems_monitor_manager_next(void *, void *, rtems_id *); |
---|
| 430 | |
---|
| 431 | /* config.c */ |
---|
| 432 | void rtems_monitor_config_canonical(rtems_monitor_config_t *, void *); |
---|
| 433 | void *rtems_monitor_config_next(void *, rtems_monitor_config_t *, rtems_id *); |
---|
[2326f0d] | 434 | void rtems_monitor_config_dump_header(bool); |
---|
| 435 | int rtems_monitor_config_dump(rtems_monitor_config_t *, bool verbose); |
---|
[b06e68ef] | 436 | |
---|
| 437 | /* mpci.c */ |
---|
[97e2729d] | 438 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[b06e68ef] | 439 | void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *); |
---|
| 440 | void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *); |
---|
[2326f0d] | 441 | void rtems_monitor_mpci_dump_header(bool); |
---|
| 442 | void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, bool verbose); |
---|
[97e2729d] | 443 | #endif |
---|
[b06e68ef] | 444 | |
---|
| 445 | /* itask.c */ |
---|
| 446 | void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *); |
---|
| 447 | void *rtems_monitor_init_task_next(void *, rtems_monitor_init_task_t *, rtems_id *); |
---|
[2326f0d] | 448 | void rtems_monitor_init_task_dump_header(bool); |
---|
| 449 | void rtems_monitor_init_task_dump(rtems_monitor_init_task_t *, bool verbose); |
---|
[b06e68ef] | 450 | |
---|
| 451 | /* extension.c */ |
---|
| 452 | void rtems_monitor_extension_canonical(rtems_monitor_extension_t *, void *); |
---|
[2326f0d] | 453 | void rtems_monitor_extension_dump_header(bool verbose); |
---|
| 454 | void rtems_monitor_extension_dump(rtems_monitor_extension_t *, bool); |
---|
[b06e68ef] | 455 | |
---|
| 456 | /* task.c */ |
---|
| 457 | void rtems_monitor_task_canonical(rtems_monitor_task_t *, void *); |
---|
[2326f0d] | 458 | void rtems_monitor_task_dump_header(bool verbose); |
---|
| 459 | void rtems_monitor_task_dump(rtems_monitor_task_t *, bool); |
---|
[b06e68ef] | 460 | |
---|
[501ab691] | 461 | /* sema.c */ |
---|
| 462 | void rtems_monitor_sema_canonical(rtems_monitor_sema_t *, void *); |
---|
[2326f0d] | 463 | void rtems_monitor_sema_dump_header(bool verbose); |
---|
| 464 | void rtems_monitor_sema_dump(rtems_monitor_sema_t *, bool); |
---|
[501ab691] | 465 | |
---|
[b06e68ef] | 466 | /* queue.c */ |
---|
| 467 | void rtems_monitor_queue_canonical(rtems_monitor_queue_t *, void *); |
---|
[2326f0d] | 468 | void rtems_monitor_queue_dump_header(bool verbose); |
---|
| 469 | void rtems_monitor_queue_dump(rtems_monitor_queue_t *, bool); |
---|
[b06e68ef] | 470 | |
---|
[501ab691] | 471 | /* region.c */ |
---|
| 472 | void rtems_monitor_region_canonical(rtems_monitor_region_t *, void *); |
---|
[2326f0d] | 473 | void rtems_monitor_region_dump_header(bool verbose); |
---|
| 474 | void rtems_monitor_region_dump(rtems_monitor_region_t *, bool); |
---|
[501ab691] | 475 | |
---|
| 476 | /* partition.c */ |
---|
| 477 | void rtems_monitor_part_canonical(rtems_monitor_part_t *, void *); |
---|
[2326f0d] | 478 | void rtems_monitor_part_dump_header(bool verbose); |
---|
| 479 | void rtems_monitor_part_dump(rtems_monitor_part_t *, bool); |
---|
[501ab691] | 480 | |
---|
[b06e68ef] | 481 | /* driver.c */ |
---|
| 482 | void *rtems_monitor_driver_next(void *, rtems_monitor_driver_t *, rtems_id *); |
---|
| 483 | void rtems_monitor_driver_canonical(rtems_monitor_driver_t *, void *); |
---|
[2326f0d] | 484 | void rtems_monitor_driver_dump_header(bool); |
---|
| 485 | void rtems_monitor_driver_dump(rtems_monitor_driver_t *, bool); |
---|
[b06e68ef] | 486 | |
---|
| 487 | /* symbols.c */ |
---|
[30b8ac1c] | 488 | rtems_symbol_table_t *rtems_symbol_table_create(void); |
---|
[b06e68ef] | 489 | void rtems_symbol_table_destroy(rtems_symbol_table_t *table); |
---|
| 490 | |
---|
[e41eaa88] | 491 | rtems_symbol_t *rtems_symbol_create(rtems_symbol_table_t *, const char *, uint32_t ); |
---|
[3e08d4e] | 492 | rtems_symbol_t *rtems_symbol_value_lookup(rtems_symbol_table_t *, uint32_t ); |
---|
| 493 | const rtems_symbol_t *rtems_symbol_value_lookup_exact(rtems_symbol_table_t *, uint32_t ); |
---|
[e41eaa88] | 494 | rtems_symbol_t *rtems_symbol_name_lookup(rtems_symbol_table_t *, const char *); |
---|
[b06e68ef] | 495 | void *rtems_monitor_symbol_next(void *object_info, rtems_monitor_symbol_t *, rtems_id *); |
---|
| 496 | void rtems_monitor_symbol_canonical(rtems_monitor_symbol_t *, rtems_symbol_t *); |
---|
[e41eaa88] | 497 | void rtems_monitor_symbol_canonical_by_name(rtems_monitor_symbol_t *, const char *); |
---|
[b06e68ef] | 498 | void rtems_monitor_symbol_canonical_by_value(rtems_monitor_symbol_t *, void *); |
---|
[2326f0d] | 499 | uint32_t rtems_monitor_symbol_dump(rtems_monitor_symbol_t *, bool); |
---|
[e41eaa88] | 500 | void rtems_monitor_symbol_cmd(int, char **, const rtems_monitor_command_arg_t*, bool); |
---|
[ac7d5ef0] | 501 | |
---|
[15a47934] | 502 | #if defined(RTEMS_NETWORKING) |
---|
| 503 | void mon_ifconfig( |
---|
| 504 | int argc, |
---|
| 505 | char *argv[], |
---|
| 506 | uint32_t command_arg, |
---|
[2326f0d] | 507 | bool verbose |
---|
[15a47934] | 508 | ); |
---|
| 509 | void mon_route( |
---|
| 510 | int argc, |
---|
| 511 | char *argv[], |
---|
| 512 | uint32_t command_arg, |
---|
[2326f0d] | 513 | bool verbose |
---|
[15a47934] | 514 | ); |
---|
| 515 | #endif |
---|
[ac7d5ef0] | 516 | |
---|
[70443b40] | 517 | /* mon-object.c */ |
---|
[e41eaa88] | 518 | const rtems_monitor_object_info_t *rtems_monitor_object_lookup( |
---|
[70443b40] | 519 | rtems_monitor_object_type_t type |
---|
| 520 | ); |
---|
| 521 | |
---|
| 522 | /* shared data */ |
---|
[ac7d5ef0] | 523 | extern rtems_symbol_table_t *rtems_monitor_symbols; |
---|
| 524 | |
---|
[b06e68ef] | 525 | #define MONITOR_WAKEUP_EVENT RTEMS_EVENT_0 |
---|
| 526 | |
---|
[ac7d5ef0] | 527 | #ifdef __cplusplus |
---|
| 528 | } |
---|
| 529 | #endif |
---|
| 530 | |
---|
| 531 | #endif /* ! __MONITOR_H */ |
---|