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

4.104.114.84.9
Last change on this file since 11290355 was 11290355, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 29, 1995 at 5:19:16 PM

all targets compile .. tony's patches in place

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