Fix `corrupt probe' complaint when reading SystemTap probes.
This commit is contained in:
parent
772af43e7d
commit
b3beac1a00
|
@ -0,0 +1,50 @@
|
|||
Index: gdb-7.3.50.20110722/gdb/elfread.c
|
||||
===================================================================
|
||||
--- gdb-7.3.50.20110722.orig/gdb/elfread.c 2012-02-29 15:26:27.445214760 -0300
|
||||
+++ gdb-7.3.50.20110722/gdb/elfread.c 2012-02-29 15:27:46.556248946 -0300
|
||||
@@ -2612,30 +2612,31 @@
|
||||
bfd *abfd = objfile->obfd;
|
||||
int size = bfd_get_arch_size (abfd) / 8;
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct type *ptr_type = builtin_type (gdbarch)->builtin_data_ptr;
|
||||
CORE_ADDR base_ref;
|
||||
|
||||
/* Provider and the name of the probe. */
|
||||
- ret->provider = (const char *) &el->data[3 * size];
|
||||
+ ret->provider = &el->data[3 * size];
|
||||
ret->name = memchr (ret->provider, '\0',
|
||||
- (unsigned long *) el->data
|
||||
- + el->size - (unsigned long *) ret->provider);
|
||||
+ (char *) el->data + el->size - ret->provider);
|
||||
/* Making sure there is a name. */
|
||||
if (!ret->name)
|
||||
- complaint (&symfile_complaints, _("corrupt probe when reading `%s'"),
|
||||
- objfile->name);
|
||||
+ {
|
||||
+ complaint (&symfile_complaints, _("corrupt probe when reading `%s'"),
|
||||
+ objfile->name);
|
||||
+ ret->provider = NULL;
|
||||
+ ret->name = NULL;
|
||||
+ }
|
||||
else
|
||||
++ret->name;
|
||||
|
||||
/* Retrieving the probe's address. */
|
||||
- ret->address = extract_typed_address ((const gdb_byte *) &el->data[0],
|
||||
- ptr_type);
|
||||
+ ret->address = extract_typed_address (&el->data[0], ptr_type);
|
||||
/* Link-time sh_addr of `.stapsdt.base' section. */
|
||||
- base_ref = extract_typed_address ((const gdb_byte *) &el->data[size],
|
||||
- ptr_type);
|
||||
+ base_ref = extract_typed_address (&el->data[size], ptr_type);
|
||||
/* Semaphore address. */
|
||||
- ret->sem_addr = extract_typed_address ((const gdb_byte *) &el->data[2 * size],
|
||||
- ptr_type);
|
||||
+ ret->sem_addr = extract_typed_address (&el->data[2 * size], ptr_type);
|
||||
|
||||
ret->address += (ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile))
|
||||
@@ -2650,15 +2651,19 @@
|
||||
if (ret->name)
|
||||
{
|
8
gdb.spec
8
gdb.spec
|
@ -27,7 +27,7 @@ Version: 7.3.50.20110722
|
|||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 11%{?_with_upstream:.upstream}%{?dist}
|
||||
Release: 12%{?_with_upstream:.upstream}%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
|
||||
Group: Development/Debuggers
|
||||
|
@ -556,6 +556,9 @@ Patch632: gdb-optimized-out-internal-error.patch
|
|||
# Hack for proper PIE run of the testsuite.
|
||||
Patch634: gdb-runtest-pie-override.patch
|
||||
|
||||
# Fix `corrupt probe' warnings for SystemTap probes.
|
||||
Patch647: gdb-stap-corrupt-probes-fix.patch
|
||||
|
||||
BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
|
||||
# --without-system-readline
|
||||
# Requires: readline%{?_isa}
|
||||
|
@ -1252,6 +1255,9 @@ fi
|
|||
%{_infodir}/gdb.info*
|
||||
|
||||
%changelog
|
||||
* Wed Mar 1 2012 Sergio Durigan Junior <sergiodj@redhat.com> - 7.3.50.20110722-12.fc16
|
||||
- Fix `corrupt probe' complaint when reading SystemTap probes.
|
||||
|
||||
* Tue Nov 29 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3.50.20110722-11.fc16
|
||||
- No longer build bundled libstdc++ pretty printers on RHELs >= 7.
|
||||
|
||||
|
|
Loading…
Reference in New Issue