tools/elf4rom/libs/dwarf-20071209/dwarfdump/dwconf.h
changeset 34 92d87f2e53c2
equal deleted inserted replaced
33:1af5c1be89f8 34:92d87f2e53c2
       
     1 /*
       
     2   Copyright (C) 2006 Silicon Graphics, Inc.  All Rights Reserved.
       
     3 
       
     4   This program is free software; you can redistribute it and/or modify it
       
     5   under the terms of version 2 of the GNU General Public License as
       
     6   published by the Free Software Foundation.
       
     7 
       
     8   This program is distributed in the hope that it would be useful, but
       
     9   WITHOUT ANY WARRANTY; without even the implied warranty of
       
    10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       
    11 
       
    12   Further, this software is distributed without any warranty that it is
       
    13   free of the rightful claim of any third person regarding infringement
       
    14   or the like.  Any license provided herein, whether implied or
       
    15   otherwise, applies only to this software file.  Patent licenses, if
       
    16   any, provided herein do not apply to combinations of this program with
       
    17   other software, or any other product whatsoever.
       
    18 
       
    19   You should have received a copy of the GNU General Public License along
       
    20   with this program; if not, write the Free Software Foundation, Inc., 51
       
    21   Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
       
    22 
       
    23   Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
       
    24   Mountain View, CA 94043, or:
       
    25 
       
    26   http://www.sgi.com
       
    27 
       
    28   For further information regarding this notice, see:
       
    29 
       
    30   http://oss.sgi.com/projects/GenInfo/NoticeExplan
       
    31 
       
    32 
       
    33 $Header: /plroot/cmplrs.src/v7.4.5m/.RCS/PL/dwarfdump/RCS/dwconf.h,v 1.2 2006/04/18 04:29:39 davea Exp $ */
       
    34 
       
    35 
       
    36 /*
       
    37     declarations helping configure the frame reader.
       
    38 */
       
    39 struct dwconf_s {
       
    40     char *cf_config_file_path;
       
    41     char *cf_abi_name;
       
    42 
       
    43     /* 2 for old, 3 for frame interface 3. 2 means use the old
       
    44        mips-abi-oriented frame interface. 3 means use the new
       
    45        DWARF3-capable and configureable-abi interface.
       
    46 
       
    47        Now, anyone who revises dwarf.h and libdwarf.h to match their
       
    48        abi-of-interest will still be able to use cf_interface_number 2
       
    49        as before.  But most folks don't update those header files and
       
    50        instead of making *them* configurable we make dwarfdump (and
       
    51        libdwarf) configurable sufficiently to print frame information
       
    52        sensibly. */
       
    53     int cf_interface_number;
       
    54 
       
    55     /* The number of table rules , aka columns. For MIPS/IRIX is 66. */
       
    56     unsigned long cf_table_entry_count;
       
    57 
       
    58     /* Array of cf_table_entry_count reg names. Names not filled in
       
    59        from dwarfdump.conf have NULL (0) pointer value. 
       
    60 	cf_named_regs_table_size must match size of cf_regs array.
       
    61 	Set cf_regs_malloced  1  if table was malloced. Set 0
       
    62         if static.
       
    63 	*/
       
    64     char **cf_regs;
       
    65     unsigned long cf_named_regs_table_size;
       
    66     int    cf_regs_malloced; 
       
    67 
       
    68     /* The 'default initial value' when intializing a table. for MIPS
       
    69        is DW_FRAME_SAME_VAL(1035). For other ISA/ABIs may be
       
    70        DW_FRAME_UNDEFINED_VAL(1034). */
       
    71     int cf_initial_rule_value;
       
    72 
       
    73     /* The number of the cfa 'register'. For cf_interface_number 2 of 
       
    74        MIPS this is 0. For other architectures (and anytime using
       
    75        cf_interface_number 3) this should be outside the table, a
       
    76        special value such as 1036, not a table column at all).  */
       
    77     int cf_cfa_reg;
       
    78 };
       
    79 
       
    80 
       
    81 /* Returns DW_DLV_OK if works. DW_DLV_ERROR if cannot do what is asked. */
       
    82 int find_conf_file_and_read_config(char *named_file,
       
    83 				   char *named_abi, char **defaults,
       
    84 				   struct dwconf_s *conf_out);
       
    85 void init_conf_file_data(struct dwconf_s *config_file_data);
       
    86 
       
    87 void print_reg_from_config_data(Dwarf_Signed reg,
       
    88 		struct dwconf_s *config_data);
       
    89 
       
    90 
       
    91 void init_generic_config_1000_regs(struct dwconf_s *conf);