summaryrefslogtreecommitdiffstats
path: root/backends/ppc_retval.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/ppc_retval.c')
-rw-r--r--backends/ppc_retval.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c
index b8d86aca..fa0e303c 100644
--- a/backends/ppc_retval.c
+++ b/backends/ppc_retval.c
@@ -1,5 +1,5 @@
/* Function return value location for Linux/PPC ABI.
- Copyright (C) 2005, 2006 Red Hat, Inc.
+ Copyright (C) 2005, 2006, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -71,7 +71,8 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
which is the type of the return value. */
Dwarf_Attribute attr_mem;
- Dwarf_Attribute *attr = dwarf_attr (functypedie, DW_AT_type, &attr_mem);
+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type,
+ &attr_mem);
if (attr == NULL)
/* The function has no return value, like a `void' function in C. */
return 0;
@@ -85,7 +86,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
|| tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
|| tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
{
- attr = dwarf_attr (typedie, DW_AT_type, &attr_mem);
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
typedie = dwarf_formref_die (attr, &die_mem);
tag = dwarf_tag (typedie);
}
@@ -97,9 +98,9 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
return -1;
case DW_TAG_subrange_type:
- if (! dwarf_hasattr (typedie, DW_AT_byte_size))
+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
{
- attr = dwarf_attr (typedie, DW_AT_type, &attr_mem);
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
typedie = dwarf_formref_die (attr, &die_mem);
tag = dwarf_tag (typedie);
}
@@ -109,8 +110,8 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
case DW_TAG_enumeration_type:
case DW_TAG_pointer_type:
case DW_TAG_ptr_to_member_type:
- if (dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
- &attr_mem), &size) != 0)
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) != 0)
{
if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
size = 4;
@@ -122,8 +123,10 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
if (tag == DW_TAG_base_type)
{
Dwarf_Word encoding;
- if (dwarf_formudata (dwarf_attr (typedie, DW_AT_encoding,
- &attr_mem), &encoding) != 0)
+ if (dwarf_formudata (dwarf_attr_integrate (typedie,
+ DW_AT_encoding,
+ &attr_mem),
+ &encoding) != 0)
return -1;
if (encoding == DW_ATE_float)
{
@@ -145,8 +148,8 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
case DW_TAG_union_type:
case DW_TAG_array_type:
if (SVR4_STRUCT_RETURN
- && dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
- &attr_mem), &size) == 0
+ && dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) == 0
&& size > 0 && size <= 8)
goto intreg;
goto aggregate;