Skip to content

Commit def7dca

Browse files
authored
Merge pull request #193 from vvuk/fix-gdb
Fix gdb to recognize ELFOSABI_IRIX
2 parents 701548a + 013a78b commit def7dca

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- /usr/people/vladimir/tmp/mips-irix-tdep.c 2021-11-18 15:21:59.857384191 +0000
2+
+++ gdb-7.6.2/gdb/mips-irix-tdep.c 2021-11-18 15:06:29.784909361 +0000
3+
@@ -28,6 +28,10 @@
4+
#include "trad-frame.h"
5+
#include "tramp-frame.h"
6+
7+
+#ifndef ELFOSABI_IRIX
8+
+#define ELFOSABI_IRIX 8
9+
+#endif
10+
+
11+
static void
12+
mips_irix_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect,
13+
void *obj)
14+
@@ -63,6 +67,9 @@
15+
16+
elfosabi = elf_elfheader (abfd)->e_ident[EI_OSABI];
17+
18+
+ if (elfosabi == ELFOSABI_IRIX)
19+
+ return GDB_OSABI_IRIX;
20+
+
21+
if (elfosabi == ELFOSABI_NONE)
22+
{
23+
/* When elfosabi is ELFOSABI_NONE (0), then the ELF structures in the

packages/gdb/SPECS/gdb.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
Summary: The GNU Debugger
1212
Name: gdb
1313
Version: 7.6.2
14-
Release: 8%{?dist}
14+
Release: 9%{?dist}
1515
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
1616
URL: http://ftp.gnu.org/gnu/gdb/
1717
Source: http://ftp.gnu.org/gnu/gdb/gdb-%{version}.tar.gz
1818

1919
Patch0: gdb762.sgifixups.patch
20+
Patch1: gdb.elfirix.patch
2021

2122
BuildRequires: gcc, binutils
2223
BuildRequires: automake, autoconf, libtool, pkgconfig
@@ -33,6 +34,7 @@ The gnu debugger.
3334
%setup
3435

3536
%patch0 -p1 -b .sgifixups
37+
%patch1 -p1 -b .elfirix
3638

3739
# A place to generate our patch
3840
#exit 1

0 commit comments

Comments
 (0)