Debuginfo for O0
This commit is contained in:
parent
ed558aec24
commit
bb1df7b9cf
89
rpm-4.4.2-debugopt.patch
Normal file
89
rpm-4.4.2-debugopt.patch
Normal file
@ -0,0 +1,89 @@
|
||||
--- rpm-4.4.2/tools/debugedit.c.dbgopt 2006-10-31 09:29:53.000000000 +0000
|
||||
+++ rpm-4.4.2/tools/debugedit.c 2006-10-31 09:29:59.000000000 +0000
|
||||
@@ -724,37 +724,57 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (t->attr[i].attr == DW_AT_comp_dir) {
|
||||
- if (form == DW_FORM_strp &&
|
||||
- debug_sections[DEBUG_STR].data)
|
||||
- {
|
||||
- char *dir;
|
||||
-
|
||||
- dir = debug_sections[DEBUG_STR].data
|
||||
- + do_read_32_relocated (ptr);
|
||||
- free (comp_dir);
|
||||
- comp_dir = strdup (dir);
|
||||
+ if (t->attr[i].attr == DW_AT_comp_dir)
|
||||
+ {
|
||||
+ if ( form == DW_FORM_string )
|
||||
+ {
|
||||
+ free (comp_dir);
|
||||
+ comp_dir = strdup (ptr);
|
||||
+
|
||||
+ if (phase == 1 && dest_dir && has_prefix (ptr, base_dir))
|
||||
+ {
|
||||
+ base_len = strlen (base_dir);
|
||||
+ dest_len = strlen (dest_dir);
|
||||
+
|
||||
+ memcpy (ptr, dest_dir, dest_len);
|
||||
+ if (dest_len < base_len)
|
||||
+ {
|
||||
+ memset(ptr + dest_len, '/',
|
||||
+ base_len - dest_len);
|
||||
+
|
||||
+ }
|
||||
+ elf_flagdata (debug_sections[DEBUG_INFO].elf_data,
|
||||
+ ELF_C_SET, ELF_F_DIRTY);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ else if (form == DW_FORM_strp &&
|
||||
+ debug_sections[DEBUG_STR].data)
|
||||
+ {
|
||||
+ char *dir;
|
||||
|
||||
- if (phase == 1 && dest_dir && has_prefix (dir, base_dir))
|
||||
- {
|
||||
- base_len = strlen (base_dir);
|
||||
- dest_len = strlen (dest_dir);
|
||||
+ dir = debug_sections[DEBUG_STR].data
|
||||
+ + do_read_32_relocated (ptr);
|
||||
+
|
||||
+ free (comp_dir);
|
||||
+ comp_dir = strdup (dir);
|
||||
+
|
||||
+ if (phase == 1 && dest_dir && has_prefix (dir, base_dir))
|
||||
+ {
|
||||
+ base_len = strlen (base_dir);
|
||||
+ dest_len = strlen (dest_dir);
|
||||
|
||||
- memcpy (dir, dest_dir, dest_len);
|
||||
- if (dest_len < base_len)
|
||||
- {
|
||||
- memmove (dir + dest_len, dir + base_len,
|
||||
- strlen (dir + base_len) + 1);
|
||||
- }
|
||||
- elf_flagdata (debug_sections[DEBUG_STR].elf_data,
|
||||
- ELF_C_SET, ELF_F_DIRTY);
|
||||
- }
|
||||
- }
|
||||
- else if (form == DW_FORM_string) {
|
||||
- free(comp_dir);
|
||||
- comp_dir = strdup (ptr);
|
||||
- }
|
||||
- }
|
||||
+ memcpy (dir, dest_dir, dest_len);
|
||||
+ if (dest_len < base_len)
|
||||
+ {
|
||||
+ memmove (dir + dest_len, dir + base_len,
|
||||
+ strlen (dir + base_len) + 1);
|
||||
+ }
|
||||
+ elf_flagdata (debug_sections[DEBUG_STR].elf_data,
|
||||
+ ELF_C_SET, ELF_F_DIRTY);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
else if ((t->tag == DW_TAG_compile_unit
|
||||
|| t->tag == DW_TAG_partial_unit)
|
||||
&& t->attr[i].attr == DW_AT_name
|
15
rpm.spec
15
rpm.spec
@ -20,7 +20,7 @@ Name: rpm
|
||||
%define version 4.4.2
|
||||
Version: %{version}
|
||||
%{expand: %%define rpm_version %{version}}
|
||||
Release: 32
|
||||
Release: 34%{?dist}
|
||||
Group: System Environment/Base
|
||||
Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz
|
||||
Source1: mono-find-provides
|
||||
@ -58,6 +58,8 @@ Patch29: rpm-4.4.2-rpmio-ipv6.patch
|
||||
Patch30: rpm-4.4.2-gnuhash.patch
|
||||
Patch31: rpm-4.4.2-debugedit-ppc-reloc.patch
|
||||
Patch32: rpm-4.4.2-debugpaths.patch
|
||||
Patch33: rpm-4.4.2-transaction-order.patch
|
||||
Patch34: rpm-4.4.2-debugopt.patch
|
||||
License: GPL
|
||||
Conflicts: patch < 2.5
|
||||
%ifos linux
|
||||
@ -203,6 +205,8 @@ shell-like rules.
|
||||
%patch30 -p1 -b .gnuhash
|
||||
%patch31 -p0 -b .dbgppc
|
||||
%patch32 -p1 -b .dbgpaths
|
||||
%patch33 -p1 -b .order
|
||||
%patch34 -p1 -b .dbgopt
|
||||
|
||||
# rebuild configure for ipv6
|
||||
autoconf
|
||||
@ -219,7 +223,8 @@ WITH_PYTHON="--without-python"
|
||||
%endif
|
||||
|
||||
%ifos linux
|
||||
CFLAGS="$RPM_OPT_FLAGS"; export CFLAGS
|
||||
CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed 's/O2/O0/')
|
||||
export CFLAGS
|
||||
./configure --prefix=%{__prefix} --sysconfdir=/etc \
|
||||
--localstatedir=/var --infodir='${prefix}%{__share}/info' \
|
||||
--mandir='${prefix}%{__share}/man' \
|
||||
@ -599,6 +604,12 @@ exit 0
|
||||
%{__includedir}/popt.h
|
||||
|
||||
%changelog
|
||||
* Tue Oct 31 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-34
|
||||
- Debuginfo extraction with O0
|
||||
|
||||
* Wed Oct 25 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-33
|
||||
- Fix for ordering (#202540, #202542, #202543, #202544)
|
||||
|
||||
* Thu Sep 07 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-32
|
||||
- Various debuginfo fixes (#165434, #165418, #149113, #205339)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user