pro_forms.c revision 49d3bc91e27cd871b950d56c01398fa2f2e12ab4
/*
Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
under the terms of version 2.1 of the GNU Lesser General Public License
as published by the Free Software Foundation.
This program is distributed in the hope that it would be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Further, this software is distributed without any warranty that it is
free of the rightful claim of any third person regarding infringement
or the like. Any license provided herein, whether implied or
otherwise, applies only to this software file. Patent licenses, if
any, provided herein do not apply to combinations of this program with
other software, or any other product whatsoever.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
USA.
Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
Mountain View, CA 94043, or:
For further information regarding this notice, see:
*/
#include "config.h"
#include "libdwarfdefs.h"
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "pro_incl.h"
#include "pro_expr.h"
#ifndef R_MIPS_NONE
#define R_MIPS_NONE 0
#endif
/* Indicates no relocation needed. */
#define NO_ELF_SYM_INDEX 0
/* adds an attribute to a die */
/*
This function adds an attribute whose value is
a target address to the given die. The attribute
is given the name provided by attr. The address
is given in pc_value.
*/
/* old interface */
{
return
attr,
}
/* new interface */
Dwarf_Error * error)
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
attr != DW_AT_MIPS_loop_begin &&
attr != DW_AT_MIPS_epilog_begin) {
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
if (sym_index != NO_ELF_SYM_INDEX)
else
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
(const void *) &pc_value,
sizeof(pc_value), upointer_size);
/* add attribute to the die */
return new_attr;
}
/*
This function adds attributes whose value
is an unsigned constant. It determines the
size of the value field from the value of
the constant.
*/
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_ordering:
case DW_AT_byte_size:
case DW_AT_bit_offset:
case DW_AT_bit_size:
case DW_AT_inline:
case DW_AT_language:
case DW_AT_visibility:
case DW_AT_virtuality:
case DW_AT_accessibility:
case DW_AT_address_class:
case DW_AT_calling_convention:
case DW_AT_encoding:
case DW_AT_identifier_case:
break;
case DW_AT_decl_column:
case DW_AT_decl_file:
case DW_AT_decl_line:
case DW_AT_const_value:
case DW_AT_start_scope:
case DW_AT_stride_size:
case DW_AT_count:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
/*
Compute the number of bytes needed to hold constant. */
size = 1;
size = 2;
size = 4;
} else {
size = 8;
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
/*
This function adds attributes whose value
is an signed constant. It determines the
size of the value field from the value of
the constant.
*/
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_upper_bound:
case DW_AT_lower_bound:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
/*
Compute the number of bytes needed to hold constant. */
size = 1;
size = 2;
size = 4;
} else {
size = 8;
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
*/
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
/*
This function adds attributes whose value
is a location expression.
*/
{
char encode_buffer[ENCODE_SPACE_NEEDED];
int res;
char *len_str;
int len_size;
int block_size;
char *block_dest_ptr;
int do_len_as_int = 0;
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_location:
case DW_AT_string_length:
case DW_AT_const_value:
case DW_AT_use_location:
case DW_AT_return_addr:
case DW_AT_frame_base:
case DW_AT_static_link:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
/*
Compute the number of bytes needed to hold constant. */
if (block_size <= UCHAR_MAX) {
len_size = 1;
do_len_as_int = 1;
} else if (block_size <= USHRT_MAX) {
len_size = 2;
do_len_as_int = 1;
} else if (block_size <= UINT_MAX) {
len_size = 4;
do_len_as_int = 1;
} else {
sizeof(encode_buffer));
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
len_str = (char *) encode_buffer;
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
} else {
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
if (do_len_as_int) {
sizeof(block_size), len_size);
} else {
/* is uleb number form */
}
/* add attribute to the die */
return new_attr;
}
/*
This function adds attributes of reference class.
The references here are local CU references,
not DW_FORM_ref_addr.
The offset field is 4 bytes for 32-bit objects,
and 8-bytes for 64-bit objects. Otherdie is the
that is referenced by ownerdie.
For reference attributes, the ar_data and ar_nbytes
are not needed. Instead, the ar_ref_die points to
the other die, and its di_offset value is used as
the reference value.
*/
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_specification:
case DW_AT_discr:
case DW_AT_common_reference:
case DW_AT_import:
case DW_AT_containing_type:
case DW_AT_default_value:
case DW_AT_abstract_origin:
case DW_AT_friend:
case DW_AT_priority:
case DW_AT_type:
case DW_AT_lower_bound:
case DW_AT_upper_bound:
case DW_AT_count:
case DW_AT_sibling:
case DW_AT_MIPS_stride:
case DW_AT_MIPS_stride_byte:
case DW_AT_MIPS_stride_elem:
case DW_AT_MIPS_clone_origin:
case DW_AT_MIPS_ptr_dopetype:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
/*
This function adds attributes of the flag class.
*/
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_is_optional:
case DW_AT_artificial:
case DW_AT_declaration:
case DW_AT_external:
case DW_AT_prototyped:
case DW_AT_variable_parameter:
case DW_AT_MIPS_has_inlines:
case DW_AT_MIPS_assumed_size:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
/*
This function adds values of attributes
belonging to the string class.
*/
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
switch (attr) {
case DW_AT_name:
case DW_AT_comp_dir:
case DW_AT_const_value:
case DW_AT_producer:
case DW_AT_MIPS_linkage_name:
case DW_AT_MIPS_abstract_name:
break;
default:{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
{
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
Dwarf_Error * error)
{
int leb_size;
char encode_buffer[ENCODE_SPACE_NEEDED];
int res;
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
sizeof(encode_buffer));
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}
Dwarf_Error * error)
{
int leb_size;
char encode_buffer[ENCODE_SPACE_NEEDED];
int res;
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
sizeof(encode_buffer));
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
return ((Dwarf_P_Attribute) DW_DLV_BADADDR);
}
/* add attribute to the die */
return new_attr;
}