public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [FYI] Fix gdb build on macOS
@ 2019-08-14 14:41 Tom Tromey
  2019-08-15  6:17 ` [committed][gdb] Fix gdb build on mips64-linux Tom de Vries
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2019-08-14 14:41 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Internal testing showed that the macOS port did not build.  The
breakage was caused by the patch to remove the gdbarch.h include from
defs.h.  This patch fixes the problem.

gdb/ChangeLog
2019-08-14  Tom Tromey  <tromey@adacore.com>

	* darwin-nat.c: Include gdbarch.h.
	* darwin-nat-info.c: Include gdbarch.h.
---
 gdb/ChangeLog         | 5 +++++
 gdb/darwin-nat-info.c | 1 +
 gdb/darwin-nat.c      | 1 +
 3 files changed, 7 insertions(+)

diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 103ac2a9773..4469cd52136 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -34,6 +34,7 @@
 #include "value.h"
 #include "gdbcmd.h"
 #include "inferior.h"
+#include "gdbarch.h"
 
 #include <sys/sysctl.h>
 
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index f890e13944c..8f71def069d 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -37,6 +37,7 @@
 #include "arch-utils.h"
 #include "bfd.h"
 #include "bfd/mach-o.h"
+#include "gdbarch.h"
 
 #include <copyfile.h>
 #include <sys/ptrace.h>
-- 
2.20.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [committed][gdb] Fix gdb build on mips64-linux
  2019-08-14 14:41 [FYI] Fix gdb build on macOS Tom Tromey
@ 2019-08-15  6:17 ` Tom de Vries
  0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2019-08-15  6:17 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

[ was: [FYI] Fix gdb build on macOS ]

On 14-08-19 16:41, Tom Tromey wrote:
> Internal testing showed that the macOS port did not build.  The
> breakage was caused by the patch to remove the gdbarch.h include from
> defs.h.  This patch fixes the problem.
> 
> gdb/ChangeLog
> 2019-08-14  Tom Tromey  <tromey@adacore.com>
> 
> 	* darwin-nat.c: Include gdbarch.h.
> 	* darwin-nat-info.c: Include gdbarch.h.

Committed similar for linux-nat-trad.c.

Thanks,
- Tom

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gdb-Fix-gdb-build-on-mips64-linux.patch --]
[-- Type: text/x-patch; name="0001-gdb-Fix-gdb-build-on-mips64-linux.patch", Size: 845 bytes --]

[gdb] Fix gdb build on mips64-linux

When compiling for mips64-linux, we get:
...
src/gdb/linux-nat-trad.c:139:12: error: ‘gdbarch_num_regs’ was not declared \
  in this scope
  139 |   regnum < gdbarch_num_regs (regcache->arch ());
...

Fix this by including gdbarch.h in linux-nat-trad.c, similar to commit
b1c896b365 "Fix gdb build on macOS".

Build on mips64-linux.

gdb/ChangeLog:

2019-08-15  Tom de Vries  <tdevries@suse.de>

	* linux-nat-trad.c: Include gdbarch.h.

---
 gdb/linux-nat-trad.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/linux-nat-trad.c b/gdb/linux-nat-trad.c
index 04507e8041..c6208dccdb 100644
--- a/gdb/linux-nat-trad.c
+++ b/gdb/linux-nat-trad.c
@@ -22,6 +22,7 @@
 
 #include "nat/gdb_ptrace.h"
 #include "inf-ptrace.h"
+#include "gdbarch.h"
 
 /* Fetch register REGNUM from the inferior.  */
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-15  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 14:41 [FYI] Fix gdb build on macOS Tom Tromey
2019-08-15  6:17 ` [committed][gdb] Fix gdb build on mips64-linux Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).