rpms/rpm/devel rpm-4.7.0-dwarf3.patch, NONE, 1.1 rpm.spec, 1.350, 1.351
Panu Matilainen
pmatilai at fedoraproject.org
Tue Jun 16 11:36:40 UTC 2009
- Previous message (by thread): rpms/mkinitrd/F-11 .cvsignore, 1.226, 1.227 mkinitrd.spec, 1.322, 1.323 sources, 1.268, 1.269
- Next message (by thread): rpms/openoffice.org/F-11 openoffice.org-3.1.1-rh505574.gccXXXX.patch, NONE, 1.1 openoffice.org.spec, 1.1915, 1.1916
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pmatilai
Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23822
Modified Files:
rpm.spec
Added Files:
rpm-4.7.0-dwarf3.patch
Log Message:
- add dwarf-3 support to debugedit (#505774)
rpm-4.7.0-dwarf3.patch:
--- NEW FILE rpm-4.7.0-dwarf3.patch ---
commit 71a7dd8b7a2df677214c18473eac661ea38fb649
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Tue Jun 16 13:52:43 2009 +0300
Add debugedit support for DWARF-3 (RhBug:505774)
- patch from Jakub Jelinek
diff --git a/tools/debugedit.c b/tools/debugedit.c
index f42b34a..b9db7db 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2005, 2007 Red Hat, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009 Red Hat, Inc.
Written by Alexander Larsson <alexl at redhat.com>, 2002
Based on code by Jakub Jelinek <jakub at redhat.com>, 2001.
@@ -88,6 +88,7 @@ static uint32_t (*do_read_32) (unsigned char *ptr);
static void (*write_32) (unsigned char *ptr, GElf_Addr val);
static int ptr_size;
+static int cu_version;
static inline uint16_t
buf_read_ule16 (unsigned char *data)
@@ -213,16 +214,18 @@ static struct
#define DEBUG_LINE 2
#define DEBUG_ARANGES 3
#define DEBUG_PUBNAMES 4
-#define DEBUG_MACINFO 5
-#define DEBUG_LOC 6
-#define DEBUG_STR 7
-#define DEBUG_FRAME 8
-#define DEBUG_RANGES 9
+#define DEBUG_PUBTYPES 5
+#define DEBUG_MACINFO 6
+#define DEBUG_LOC 7
+#define DEBUG_STR 8
+#define DEBUG_FRAME 9
+#define DEBUG_RANGES 10
{ ".debug_info", NULL, NULL, 0, 0, 0 },
{ ".debug_abbrev", NULL, NULL, 0, 0, 0 },
{ ".debug_line", NULL, NULL, 0, 0, 0 },
{ ".debug_aranges", NULL, NULL, 0, 0, 0 },
{ ".debug_pubnames", NULL, NULL, 0, 0, 0 },
+ { ".debug_pubtypes", NULL, NULL, 0, 0, 0 },
{ ".debug_macinfo", NULL, NULL, 0, 0, 0 },
{ ".debug_loc", NULL, NULL, 0, 0, 0 },
{ ".debug_str", NULL, NULL, 0, 0, 0 },
@@ -302,7 +305,7 @@ no_memory:
}
if (*slot != NULL)
{
- error (0, 0, "%s: Duplicate DWARF-2 abbreviation %d", dso->filename,
+ error (0, 0, "%s: Duplicate DWARF abbreviation %d", dso->filename,
t->entry);
free (t);
htab_delete (h);
@@ -322,7 +325,7 @@ no_memory:
form = read_uleb128 (ptr);
if (form == 2 || form > DW_FORM_indirect)
{
- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename, form);
+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename, form);
htab_delete (h);
return NULL;
}
@@ -332,7 +335,7 @@ no_memory:
}
if (read_uleb128 (ptr) != 0)
{
- error (0, 0, "%s: DWARF-2 abbreviation does not end with 2 zeros",
+ error (0, 0, "%s: DWARF abbreviation does not end with 2 zeros",
dso->filename);
htab_delete (h);
return NULL;
@@ -484,7 +487,7 @@ edit_dwarf2_line (DSO *dso, uint32_t off, char *comp_dir, int phase)
}
value = read_16 (ptr);
- if (value != 2)
+ if (value != 2 && value != 3)
{
error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
value);
@@ -829,7 +832,12 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
switch (form)
{
- case DW_FORM_ref_addr: /* ptr_size in DWARF 2, offset in DWARF 3 */
+ case DW_FORM_ref_addr:
+ if (cu_version == 2)
+ ptr += ptr_size;
+ else
+ ptr += 4;
+ break;
case DW_FORM_addr:
ptr += ptr_size;
break;
@@ -881,7 +889,7 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
assert (len < UINT_MAX);
break;
default:
- error (0, 0, "%s: Unknown DWARF-2 DW_FORM_%d", dso->filename,
+ error (0, 0, "%s: Unknown DWARF DW_FORM_%d", dso->filename,
form);
return NULL;
}
@@ -1178,11 +1186,11 @@ edit_dwarf2 (DSO *dso)
return 1;
}
- value = read_16 (ptr);
- if (value != 2)
+ cu_version = read_16 (ptr);
+ if (cu_version != 2 && cu_version != 3)
{
error (0, 0, "%s: DWARF version %d unhandled", dso->filename,
- value);
+ cu_version);
return 1;
}
@@ -1192,7 +1200,7 @@ edit_dwarf2 (DSO *dso)
if (debug_sections[DEBUG_ABBREV].data == NULL)
error (0, 0, "%s: .debug_abbrev not present", dso->filename);
else
- error (0, 0, "%s: DWARF-2 CU abbrev offset too large",
+ error (0, 0, "%s: DWARF CU abbrev offset too large",
dso->filename);
return 1;
}
@@ -1202,14 +1210,14 @@ edit_dwarf2 (DSO *dso)
ptr_size = read_1 (ptr);
if (ptr_size != 4 && ptr_size != 8)
{
- error (0, 0, "%s: Invalid DWARF-2 pointer size %d",
+ error (0, 0, "%s: Invalid DWARF pointer size %d",
dso->filename, ptr_size);
return 1;
}
}
else if (read_1 (ptr) != ptr_size)
{
- error (0, 0, "%s: DWARF-2 pointer size differs between CUs",
+ error (0, 0, "%s: DWARF pointer size differs between CUs",
dso->filename);
return 1;
}
@@ -1227,7 +1235,7 @@ edit_dwarf2 (DSO *dso)
t = htab_find_with_hash (abbrev, &tag, tag.entry);
if (t == NULL)
{
- error (0, 0, "%s: Could not find DWARF-2 abbreviation %d",
+ error (0, 0, "%s: Could not find DWARF abbreviation %d",
dso->filename, tag.entry);
htab_delete (abbrev);
return 1;
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.350
retrieving revision 1.351
diff -u -p -r1.350 -r1.351
--- rpm.spec 12 Jun 2009 14:59:05 -0000 1.350
+++ rpm.spec 16 Jun 2009 11:36:09 -0000 1.351
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 6%{?dist}
+Release: 7%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -43,6 +43,7 @@ Patch200: rpm-4.7.0-findlang-kde3.patch
Patch201: rpm-4.7.0-prtsig.patch
Patch202: rpm-4.7.0-python-altnevr.patch
Patch203: rpm-4.7.0-hardlink-sizes.patch
+Patch204: rpm-4.7.0-dwarf3.patch
# These are not yet upstream
Patch300: rpm-4.7.0-extra-provides.patch
@@ -199,6 +200,7 @@ packages on a system.
%patch201 -p1 -b .prtsig
%patch202 -p1 -b .py-altnevr
%patch203 -p1 -b .hardlink-sizes
+%patch204 -p1 -b .dwarf3
%patch300 -p1 -b .extra-prov
%patch301 -p1 -b .niagara
@@ -413,6 +415,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Tue Jun 16 2009 Panu Matilainen <pmatilai at redhat.com> - 4.7.0-7
+- add dwarf-3 support to debugedit (#505774)
+
* Fri Jun 12 2009 Stepan Kasal <skasal at redhat.com> - 4.7.0-6
- require libcap >= 2.16 (#505596)
- Previous message (by thread): rpms/mkinitrd/F-11 .cvsignore, 1.226, 1.227 mkinitrd.spec, 1.322, 1.323 sources, 1.268, 1.269
- Next message (by thread): rpms/openoffice.org/F-11 openoffice.org-3.1.1-rh505574.gccXXXX.patch, NONE, 1.1 openoffice.org.spec, 1.1915, 1.1916
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list