This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix build failure on sparc-solaris
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 9 Jan 2010 08:54:11 +0400
- Subject: [commit] Fix build failure on sparc-solaris
I applied the following change. It's a modified version of DanielG's
change where I removed the check for UNIXWARE since, as far as I could
tell from the configure script, NEW_PROC_API implies UNIXWARE:
case "${host}" in
*-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
AC_DEFINE(NEW_PROC_API, 1,
I tried to confirm that the change was appropriate for platforms
that configure as *-*-sysv4.2* | *-*-sysv5*, but I couldn't find
a specification of SVR4 that included procfs. Perhaps this is not
part of the API, or even part of SVR4 altogether.
A look at config.guess did not help much in getting full confidence
in the patch. IMO, I think that the correct way of handling this
would be to use the same #ifdef as BFD which conditions the definition
of elfcore_write_prstatus (IOW: HAVE_PRSTATUS_T). However, I'm just
as happy to see if relying on NEW_PROC_API is good enough in practice.
I can work on improving the situation if/when a problem is reported.
This is why I decided to approve and apply this patch.
gdb/ChangeLog:
* procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
--
Joel
>From 3212cd175f75cf38055aa9fd3f3c40d2799b2781 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Fri, 8 Jan 2010 01:14:39 -0500
Subject: [PATCH] Fix build failure on sparc-solaris.
I applied the following change. It's a modified version of DanielG's
change where I removed the check for UNIXWARE since, as far as I could
tell from the configure script, NEW_PROC_API implies UNIXWARE:
case "${host}" in
*-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
AC_DEFINE(NEW_PROC_API, 1,
I tried to confirm that the change was appropriate for platforms
that configure as *-*-sysv4.2* | *-*-sysv5*, but I couldn't find
a specification of SVR4 that included procfs. Perhaps this is not
part of the API, or even part of SVR4 altogether.
A look at config.guess did not help much in getting full confidence
in the patch. IMO, I think that the correct way of handling this
would be to use the same #ifdef as BFD which conditions the definition
of elfcore_write_prstatus (IOW: HAVE_PRSTATUS_T). However, I'm just
as happy to see if relying on NEW_PROC_API is good enough in practice.
I can work on improving the situation if/when a problem is reported.
This is why I decided to approve and apply this patch.
gdb/ChangeLog:
* procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
---
gdb/procfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 286e81c..e5df886 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -6074,7 +6074,7 @@ procfs_do_thread_registers (bfd *obfd, ptid_t ptid,
target_fetch_registers (regcache, -1);
fill_gregset (regcache, &gregs, -1);
-#if defined (UNIXWARE)
+#if defined (NEW_PROC_API)
note_data = (char *) elfcore_write_lwpstatus (obfd,
note_data,
note_size,
--
1.5.4.3