Files
rpi-buildroot/package/gdb/15.2/0005-nat-fork-inferior-include-linux-ptrace.h.patch
Thomas Petazzoni e40bf89e40 package/gdb: bump 15.x series to 15.2
Changes:

 Set GDB version number to 15.2.
 [gdb/python] Make sure python sys.exit makes gdb exit
 [gdb/symtab] Revert "Change handling of DW_TAG_enumeration_type in DWARF scanner"
 [gdb/testsuite] Add regression test for PR32158
 [gdb/testsuite] Add gdb.dwarf2/enum-type-c++.exp, regression test for PR31900.
 gdb-15-branch: Clear the X86_XSTATE_MPX bit in XCRO for x32
 Recognize -2 as a tombstone value in .debug_line
 [gdb] Handle ^C during disassembly
 Mark unavailable bytes of limited-length arrays when allocating contents
 gdb/solib-frv: move lm_info object to solib
 Fix loading a saved recording
 Bump GDB's version number to 15.1.90.DATE-git.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-05-08 19:13:37 +02:00

54 lines
1.9 KiB
Diff

From 1dbb7548d94ef83b76748c66bf5ade75a154b009 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 24 Jun 2018 23:33:55 +0200
Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h
To decide whether fork() or vfork() should be used, fork-inferior.c
uses the following test:
#if !(defined(__UCLIBC__) && defined(HAS_NOMMU))
However, HAS_NOMMU is never defined, because it gets defined in
linux-ptrace.h, which is not included by fork-inferior.c. Due to this,
gdbserver fails to build on noMMU architectures. This commit fixes
that by simply including linux-ptrace.h.
This bug was introduced by commit
2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al
with gdbserver"). Indeed, the same fork()/vfork() selection was done,
but in another file where linux-ptrace.h was included.
Fixes the following build issue:
../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))':
../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope
pid = fork ();
^~~~
../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork'
pid = fork ();
^~~~
vfork
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Romain: rebase on gdb 8.3]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
gdb/nat/fork-inferior.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
index c1082eb0441..05e42dc580a 100644
--- a/gdb/nat/fork-inferior.c
+++ b/gdb/nat/fork-inferior.c
@@ -27,6 +27,7 @@
#include "gdbsupport/signals-state-save-restore.h"
#include "gdbsupport/gdb_tilde_expand.h"
#include "gdbsupport/gdb_signals.h"
+#include "linux-ptrace.h"
#include <vector>
extern char **environ;
--
2.45.2