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