Hi.

This patch fixes for free page exclusion and elf library modification.

Thanks
Ken'ichi Ohmichi

diff -puN makedumpfile.org/makedumpfile.c makedumpfile/makedumpfile.c
--- makedumpfile.org/makedumpfile.c     2006-10-04 16:42:15.000000000 +0900
+++ makedumpfile/makedumpfile.c 2006-10-04 16:42:39.000000000 +0900
@@ -665,7 +665,8 @@ static int process_attribute(Dwarf_Attri
                        size_t expcnt;
 
                        dwarf_getlocation (attr, &expr, &expcnt);
-                       dwarf_info.member_offset = expr[0].number;
+                       if (dwarf_info.member_offset == NOT_FOUND_STRUCTURE)
+                               dwarf_info.member_offset = expr[0].number;
                        *args->found_map |= DWARF_INFO_FOUND_LOCATION;
                        break;
                }
@@ -699,7 +700,7 @@ static int process_children(Dwarf_Die *d
                        *found_map |= DWARF_INFO_FOUND_MEMBER;
                }
                if (dwarf_info.cmd == DWARF_INFO_GET_NOT_NAMED_UNION_OFFSET &&
-                       (dwarf_tag(walker) == DW_TAG_union_type) &&
+                       (dwarf_tag(walker) == DW_TAG_member) &&
                        (!name)) {
                        *found_map |= DWARF_INFO_FOUND_MEMBER;
                }
@@ -751,12 +752,17 @@ next_tag:
                 * this is our structure
                 * process the children
                 */
-               *found_map |= DWARF_INFO_FOUND_STRUCT;
                dwarf_info.struct_size = dwarf_bytesize(die);
-               if (dwarf_info.cmd == DWARF_INFO_GET_STRUCT_SIZE)
-                       return;
-               if (process_children(die, found_map) == TRUE)
-                       return;
+               if (dwarf_info.struct_size > 0) {
+                       *found_map |= DWARF_INFO_FOUND_STRUCT;
+                       if (dwarf_info.cmd == DWARF_INFO_GET_STRUCT_SIZE)
+                               return;
+                       if (process_children(die, found_map) == TRUE)
+                               return;
+               }
+               /*
+                * Skip if DW_AT_byte_size is not included.
+                */
        }
 
        if (dwarf_siblingof(die,die) == 0)
_

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to