This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: GDB 5.0 won't build on GNU/Linux/sparc
- To: Alexandre Oliva <aoliva at cygnus dot com>
- Subject: Re: GDB 5.0 won't build on GNU/Linux/sparc
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Sat, 20 May 2000 10:05:12 -0700
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <oraehlelgf.fsf@tamanduatei.dcc.unicamp.br>
- Reply-To: msnyder at cygnus dot com
Alexandre Oliva wrote:
>
> gdb/sparc-tdep.c contains code in supply_gregset() and fill_gregset()
> that will only compile on Solaris/sparc. glibc doesn't define
> prgreg_t, R_I7, R_PS, R_PC, R_nPC nor R_Y. In fact, registers from i0
> to i7 aren't even available in glibc's gregset. The solution is to
> disable USE_PROC_FS, which can be accomplished by #including the
> generic config/nm-linux.h from config/sparc/nm-linux.h, as all other
> architecture-specific `nm-linux.h's do (actually, it's also missing
> from config/powerpc/nm-linux.h). Unfortunately, I don't have access to a
> GNU/Linux/powerpc platform to test the second change. On
> GNU/Linux/sparc, it builds correctly, but it still doesn't work :-(
> child_resume is called with step==1, and aborts because
> SOFTWARE_SINGLE_STEP_P is also 1. I'm investigating. Meanwhile, ok
> to install? Release branch?
I'm not the sparc maintainer, but I did commit the changes that
caused you problems. Sorry about that. Your solution seems
correct -- I'll also have a look at using a few more ifdefs
in my new code.
Michael Snyder
> ---------------------------------------------------------------
> Index: gdb/ChangeLog
> from Alexandre Oliva <aoliva@cygnus.com>
>
> * config/sparc/nm-linux.h: Include config/nm-linux.h.
> * config/powerpc/nm-linux.h: Likewise.
>
> Index: gdb/config/sparc/nm-linux.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/sparc/nm-linux.h,v
> retrieving revision 1.1.1.3
> diff -u -r1.1.1.3 nm-linux.h
> --- gdb/config/sparc/nm-linux.h 1999/12/07 03:56:12 1.1.1.3
> +++ gdb/config/sparc/nm-linux.h 2000/05/20 07:06:17
> @@ -1,5 +1,5 @@
> /* Macro definitions for running gdb on a Sparc running Linux.
> - Copyright (C) 1989, 1992, 1996, 1998 Free Software Foundation, Inc.
> + Copyright (C) 1989, 1992, 1996, 1998, 2000 Free Software Foundation, Inc.
>
> This file is part of GDB.
>
> @@ -19,6 +19,7 @@
> Boston, MA 02111-1307, USA. */
>
> #include <nm-sysv4.h>
> +#include "nm-linux.h"
> #include "solib.h"
>
> #define FETCH_INFERIOR_REGISTERS
> Index: gdb/config/powerpc/nm-linux.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/powerpc/nm-linux.h,v
> retrieving revision 1.1
> diff -u -r1.1 nm-linux.h
> --- gdb/config/powerpc/nm-linux.h 2000/02/22 01:19:11 1.1
> +++ gdb/config/powerpc/nm-linux.h 2000/05/20 07:06:17
> @@ -18,6 +18,9 @@
> Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
>
> #ifndef NM_LINUX_H
> +
> +#include "nm-linux.h"
> +
> #define NM_LINUX_H
>
> /* Return sizeof user struct to callers in less machine dependent routines */
>
> ---------------------------------------------------------------
>
> --
> Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
> Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
> Free Software Developer and Evangelist CS PhD student at IC-Unicamp
> oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me