![]() |
|
|||
File indexing completed on 2025-05-11 08:24:18
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file 0005 * 0006 * @brief RTEMS monitor symbol table functions 0007 * 0008 * Entry points for symbol table routines. 0009 */ 0010 0011 /* 0012 * COPYRIGHT (c) 1989-2022. On-Line Applications Research Corporation (OAR). 0013 * 0014 * Redistribution and use in source and binary forms, with or without 0015 * modification, are permitted provided that the following conditions 0016 * are met: 0017 * 1. Redistributions of source code must retain the above copyright 0018 * notice, this list of conditions and the following disclaimer. 0019 * 2. Redistributions in binary form must reproduce the above copyright 0020 * notice, this list of conditions and the following disclaimer in the 0021 * documentation and/or other materials provided with the distribution. 0022 * 0023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0024 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0025 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0026 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0027 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0028 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0029 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0030 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0031 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0032 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0033 * POSSIBILITY OF SUCH DAMAGE. 0034 */ 0035 0036 #ifndef _INCLUDE_SYMBOLS_H 0037 #define _INCLUDE_SYMBOLS_H 0038 0039 #include <rtems/monitor.h> 0040 0041 #ifdef __cplusplus 0042 extern "C" { 0043 #endif 0044 0045 struct _rtems_symbol_t { 0046 uint32_t value; 0047 char *name; 0048 } ; 0049 0050 #define SYMBOL_STRING_BLOCK_SIZE 4080 0051 typedef struct rtems_symbol_string_block_s { 0052 struct rtems_symbol_string_block_s *next; 0053 char buffer[SYMBOL_STRING_BLOCK_SIZE]; 0054 } rtems_symbol_string_block_t; 0055 0056 struct _rtems_symbol_table_t { 0057 0058 uint32_t sorted; /* are symbols sorted right now? */ 0059 uint32_t growth_factor; /* % to grow by when needed */ 0060 uint32_t next; /* next symbol slot to use when adding */ 0061 uint32_t size; /* max # of symbols */ 0062 0063 /* 0064 * Symbol list -- sorted by address (when we do a lookup) 0065 */ 0066 0067 rtems_symbol_t *addresses; /* symbol array by address */ 0068 0069 /* 0070 * String pool, unsorted, a list of blocks of string data 0071 */ 0072 0073 rtems_symbol_string_block_t *string_buffer_head; 0074 rtems_symbol_string_block_t *string_buffer_current; 0075 uint32_t strings_next; /* next byte to use in this block */ 0076 0077 } ; 0078 0079 #define rtems_symbol_name(sp) ((sp)->name) 0080 #define rtems_symbol_value(sp) ((sp)->value) 0081 0082 #ifdef __cplusplus 0083 } 0084 #endif 0085 0086 #endif /* ! _INCLUDE_SYMBOLS_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |