source: rtems/cpukit/libmisc/monitor/mon-extension.c @ 5e622a9

4.104.114.84.95
Last change on this file since 5e622a9 was 5beb562, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 21, 1997 at 4:58:57 PM

Cleaned up as part of adding the Monitor test.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/*
2 * RTEMS Monitor extension support
3 *
4 *  $Id$
5 */
6
7#include <rtems.h>
8#include <rtems/monitor.h>
9
10#include <stdio.h>
11
12void
13rtems_monitor_extension_canonical(
14    rtems_monitor_extension_t *canonical_extension,
15    void                  *extension_void
16)
17{
18    Extension_Control     *rtems_extension = (Extension_Control *) extension_void;
19    rtems_extensions_table *e = &rtems_extension->Extension.Callouts;
20
21    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_create,
22                                            (void *) e->thread_create);
23
24    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_start,
25                                            (void *) e->thread_start);
26    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_restart,
27                                            (void *) e->thread_restart);
28    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_delete,
29                                            (void *) e->thread_delete);
30    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_tswitch,
31                                            (void *) e->thread_switch);
32    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_begin,
33                                            (void *) e->thread_begin);
34    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_exitted,
35                                            (void *) e->thread_exitted);
36    rtems_monitor_symbol_canonical_by_value(&canonical_extension->e_fatal,
37                                            (void *) e->fatal);
38}
39
40void
41rtems_monitor_extension_dump_header(
42    boolean verbose
43)
44{
45    printf("\
46  ID       NAME\n");
47/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
480         1         2         3         4         5         6         7       */
49           
50    rtems_monitor_separator();
51}
52
53
54/*
55 * Dump out the canonical form
56 */
57
58void
59rtems_monitor_extension_dump(
60    rtems_monitor_extension_t *monitor_extension,
61    boolean  verbose
62)
63{
64    unsigned32           length = 0;
65
66    length += rtems_monitor_dump_id(monitor_extension->id);
67    length += rtems_monitor_pad(11, length);
68    length += rtems_monitor_dump_name(monitor_extension->name);
69
70    length += rtems_monitor_pad(18, length);
71    length += printf("create: ");
72    length += rtems_monitor_symbol_dump(&monitor_extension->e_create, verbose);
73    length += printf(";  start: ");
74    length += rtems_monitor_symbol_dump(&monitor_extension->e_start, verbose);
75    length += printf(";  restart: ");
76    length += rtems_monitor_symbol_dump(&monitor_extension->e_restart, verbose);
77    length += printf("\n");
78    length = 0;
79
80    length += rtems_monitor_pad(18, length);
81    length += printf("delete: ");
82    length += rtems_monitor_symbol_dump(&monitor_extension->e_delete, verbose);
83    length += printf(";  switch: ");
84    length += rtems_monitor_symbol_dump(&monitor_extension->e_tswitch, verbose);
85    length += printf(";  begin: ");
86    length += rtems_monitor_symbol_dump(&monitor_extension->e_begin, verbose);
87    length += printf("\n");
88    length = 0;
89
90    length += rtems_monitor_pad(18, length);
91    length += printf("exitted: ");
92    length += rtems_monitor_symbol_dump(&monitor_extension->e_exitted, verbose);
93    length += printf(";  fatal: ");
94    length += rtems_monitor_symbol_dump(&monitor_extension->e_fatal, verbose);
95    length += printf("\n");
96    length = 0;
97    printf("\n");
98}
Note: See TracBrowser for help on using the repository browser.