* [PATCH RFA] Create new file mips-tdep.h
@ 2002-10-03 18:03 Kevin Buettner
2002-10-03 19:25 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kevin Buettner @ 2002-10-03 18:03 UTC (permalink / raw)
To: gdb-patches
I have some other changes under way in which I will need to know which
mips ABI is in use. I've moved struct gdbarch_tdep and the enums
that it depends upon into a new header file.
Okay?
* Makefile.in (mips_tdep_h): Define.
(mips-tdep.o): Remove osabi_h from dependency list. Add mips_tdep_h
to dependency list.
* mips-tdep.h: New file.
* mips-tdep.c (mips-tdep.h): Include.
(osabi.h): Don't include (since it's included by mips-tdep.h).
(enum mips_abi, enum_mips_fpu_type, struct gdbarch_tdep): Move
definitions to mips-tdep.h.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.267
diff -u -p -r1.267 Makefile.in
--- Makefile.in 1 Oct 2002 19:26:04 -0000 1.267
+++ Makefile.in 4 Oct 2002 00:49:40 -0000
@@ -684,6 +684,7 @@ macrotab_h = macrotab.h
main_h = main.h
memattr_h = memattr.h
minimon_h = minimon.h
+mips_tdep_h = mips-tdep.h $(osabi_h)
mipsnbsd_tdep_h = mipsnbsd-tdep.h
monitor_h = monitor.h
nbsd_tdep_h = nbsd-tdep.h
@@ -1902,7 +1903,7 @@ mips-nat.o: mips-nat.c $(defs_h) $(infer
mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(target_h) $(arch_utils_h) \
- $(regcache_h) $(osabi_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
+ $(regcache_h) $(mips_tdep_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
$(symcat_h)
mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.129
diff -u -p -r1.129 mips-tdep.c
--- mips-tdep.c 2 Oct 2002 01:28:55 -0000 1.129
+++ mips-tdep.c 4 Oct 2002 00:49:42 -0000
@@ -38,7 +38,7 @@
#include "target.h"
#include "arch-utils.h"
#include "regcache.h"
-#include "osabi.h"
+#include "mips-tdep.h"
#include "opcode/mips.h"
#include "elf/mips.h"
@@ -57,19 +57,6 @@ enum
MIPS_FPU_DOUBLE_REGSIZE = 8
};
-/* All the possible MIPS ABIs. */
-
-enum mips_abi
- {
- MIPS_ABI_UNKNOWN = 0,
- MIPS_ABI_N32,
- MIPS_ABI_O32,
- MIPS_ABI_N64,
- MIPS_ABI_O64,
- MIPS_ABI_EABI32,
- MIPS_ABI_EABI64,
- MIPS_ABI_LAST
- };
static const char *mips_abi_string;
@@ -105,17 +92,6 @@ static const char *size_enums[] = {
0
};
-/* Some MIPS boards don't support floating point while others only
- support single-precision floating-point operations. See also
- FP_REGISTER_DOUBLE. */
-
-enum mips_fpu_type
- {
- MIPS_FPU_DOUBLE, /* Full double precision floating point. */
- MIPS_FPU_SINGLE, /* Single precision floating point (R4650). */
- MIPS_FPU_NONE /* No floating point. */
- };
-
#ifndef MIPS_DEFAULT_FPU_TYPE
#define MIPS_DEFAULT_FPU_TYPE MIPS_FPU_DOUBLE
#endif
@@ -124,26 +100,6 @@ static enum mips_fpu_type mips_fpu_type
static int mips_debug = 0;
-/* MIPS specific per-architecture information */
-struct gdbarch_tdep
- {
- /* from the elf header */
- int elf_flags;
-
- /* mips options */
- enum mips_abi mips_abi;
- enum mips_abi found_abi;
- enum mips_fpu_type mips_fpu_type;
- int mips_last_arg_regnum;
- int mips_last_fp_arg_regnum;
- int mips_default_saved_regsize;
- int mips_fp_register_double;
- int mips_default_stack_argsize;
- int gdb_target_is_mips64;
- int default_mask_address_p;
-
- enum gdb_osabi osabi;
- };
#define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
|| gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI64)
Index: mips-tdep.h
===================================================================
RCS file: mips-tdep.h
diff -N mips-tdep.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mips-tdep.h 4 Oct 2002 00:49:42 -0000
@@ -0,0 +1,72 @@
+/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef MIPS_TDEP_H
+#define MIPS_TDEP_H
+
+#include "osabi.h"
+
+/* All the possible MIPS ABIs. */
+enum mips_abi
+ {
+ MIPS_ABI_UNKNOWN = 0,
+ MIPS_ABI_N32,
+ MIPS_ABI_O32,
+ MIPS_ABI_N64,
+ MIPS_ABI_O64,
+ MIPS_ABI_EABI32,
+ MIPS_ABI_EABI64,
+ MIPS_ABI_LAST
+ };
+
+/* Some MIPS boards don't support floating point while others only
+ support single-precision floating-point operations. See also
+ FP_REGISTER_DOUBLE. */
+
+enum mips_fpu_type
+ {
+ MIPS_FPU_DOUBLE, /* Full double precision floating point. */
+ MIPS_FPU_SINGLE, /* Single precision floating point (R4650). */
+ MIPS_FPU_NONE /* No floating point. */
+ };
+
+/* MIPS specific per-architecture information */
+struct gdbarch_tdep
+ {
+ /* from the elf header */
+ int elf_flags;
+
+ /* mips options */
+ enum mips_abi mips_abi;
+ enum mips_abi found_abi;
+ enum mips_fpu_type mips_fpu_type;
+ int mips_last_arg_regnum;
+ int mips_last_fp_arg_regnum;
+ int mips_default_saved_regsize;
+ int mips_fp_register_double;
+ int mips_default_stack_argsize;
+ int gdb_target_is_mips64;
+ int default_mask_address_p;
+
+ enum gdb_osabi osabi;
+ };
+
+#endif /* MIPS_TDEP_H */
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-10-03 18:03 [PATCH RFA] Create new file mips-tdep.h Kevin Buettner
@ 2002-10-03 19:25 ` Daniel Jacobowitz
2002-10-21 12:08 ` Andrew Cagney
2002-11-04 18:12 ` Andrew Cagney
2 siblings, 0 replies; 7+ messages in thread
From: Daniel Jacobowitz @ 2002-10-03 19:25 UTC (permalink / raw)
To: gdb-patches
On Thu, Oct 03, 2002 at 06:03:49PM -0700, Kevin Buettner wrote:
> I have some other changes under way in which I will need to know which
> mips ABI is in use. I've moved struct gdbarch_tdep and the enums
> that it depends upon into a new header file.
>
> Okay?
I think this is a good idea, though of course you'll need to wait for
Andrew - it may be some time, I believe.
This patch reminded me of something. I don't really like the fact that
we have a "struct gdbarch_tdep" for every architecture; when we have a
multi-architecture GDB this will cause tremendous debugging confusion.
How intrusive do you think it would be to opaquify it (I hope that's
not really a word) properly, and have a struct mips_gdbarch_tdep?
>
> * Makefile.in (mips_tdep_h): Define.
> (mips-tdep.o): Remove osabi_h from dependency list. Add mips_tdep_h
> to dependency list.
> * mips-tdep.h: New file.
> * mips-tdep.c (mips-tdep.h): Include.
> (osabi.h): Don't include (since it's included by mips-tdep.h).
> (enum mips_abi, enum_mips_fpu_type, struct gdbarch_tdep): Move
> definitions to mips-tdep.h.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-10-03 18:03 [PATCH RFA] Create new file mips-tdep.h Kevin Buettner
2002-10-03 19:25 ` Daniel Jacobowitz
@ 2002-10-21 12:08 ` Andrew Cagney
2002-10-21 12:15 ` Daniel Jacobowitz
2002-11-04 18:12 ` Andrew Cagney
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-10-21 12:08 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> I have some other changes under way in which I will need to know which
> mips ABI is in use.
Can you expand on this? Where, outside of mips-tdep.c will this be needed?
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-10-21 12:08 ` Andrew Cagney
@ 2002-10-21 12:15 ` Daniel Jacobowitz
2002-10-22 9:26 ` Kevin Buettner
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2002-10-21 12:15 UTC (permalink / raw)
To: Andrew Cagney; +Cc: Kevin Buettner, gdb-patches
On Mon, Oct 21, 2002 at 02:13:02PM -0400, Andrew Cagney wrote:
> >I have some other changes under way in which I will need to know which
> >mips ABI is in use.
>
>
> Can you expand on this? Where, outside of mips-tdep.c will this be needed?
Well, I've got a patch which depends on Kevin's, in which I need to get
at the tdep information in mips-linux-tdep.c. That's signal frame
support... it was quite a hassle to get it working :)
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-10-21 12:15 ` Daniel Jacobowitz
@ 2002-10-22 9:26 ` Kevin Buettner
0 siblings, 0 replies; 7+ messages in thread
From: Kevin Buettner @ 2002-10-22 9:26 UTC (permalink / raw)
To: Daniel Jacobowitz, Andrew Cagney; +Cc: Kevin Buettner, gdb-patches
On Oct 21, 3:15pm, Daniel Jacobowitz wrote:
> On Mon, Oct 21, 2002 at 02:13:02PM -0400, Andrew Cagney wrote:
> > >I have some other changes under way in which I will need to know which
> > >mips ABI is in use.
> >
> >
> > Can you expand on this? Where, outside of mips-tdep.c will this be needed?
>
> Well, I've got a patch which depends on Kevin's, in which I need to get
> at the tdep information in mips-linux-tdep.c. That's signal frame
> support... it was quite a hassle to get it working :)
Yep, mips-linux-tdep.c is where I need it too.
Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-10-03 18:03 [PATCH RFA] Create new file mips-tdep.h Kevin Buettner
2002-10-03 19:25 ` Daniel Jacobowitz
2002-10-21 12:08 ` Andrew Cagney
@ 2002-11-04 18:12 ` Andrew Cagney
2002-12-04 21:21 ` Kevin Buettner
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Cagney @ 2002-11-04 18:12 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> I have some other changes under way in which I will need to know which
> mips ABI is in use. I've moved struct gdbarch_tdep and the enums
> that it depends upon into a new header file.
>
> Okay?
>
> * Makefile.in (mips_tdep_h): Define.
> (mips-tdep.o): Remove osabi_h from dependency list. Add mips_tdep_h
> to dependency list.
> * mips-tdep.h: New file.
> * mips-tdep.c (mips-tdep.h): Include.
> (osabi.h): Don't include (since it's included by mips-tdep.h).
> (enum mips_abi, enum_mips_fpu_type, struct gdbarch_tdep): Move
> definitions to mips-tdep.h.
Rather than publishing `struct gdbarch_tdep', can you instead just
publish accessor methods for the parts you need? Otherwize ok.
Andrew
> Index: Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/Makefile.in,v
> retrieving revision 1.267
> diff -u -p -r1.267 Makefile.in
> --- Makefile.in 1 Oct 2002 19:26:04 -0000 1.267
> +++ Makefile.in 4 Oct 2002 00:49:40 -0000
> @@ -684,6 +684,7 @@ macrotab_h = macrotab.h
> main_h = main.h
> memattr_h = memattr.h
> minimon_h = minimon.h
> +mips_tdep_h = mips-tdep.h $(osabi_h)
> mipsnbsd_tdep_h = mipsnbsd-tdep.h
> monitor_h = monitor.h
> nbsd_tdep_h = nbsd-tdep.h
> @@ -1902,7 +1903,7 @@ mips-nat.o: mips-nat.c $(defs_h) $(infer
> mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
> $(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
> $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(target_h) $(arch_utils_h) \
> - $(regcache_h) $(osabi_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
> + $(regcache_h) $(mips_tdep_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
> $(symcat_h)
> mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
> mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.129
> diff -u -p -r1.129 mips-tdep.c
> --- mips-tdep.c 2 Oct 2002 01:28:55 -0000 1.129
> +++ mips-tdep.c 4 Oct 2002 00:49:42 -0000
> @@ -38,7 +38,7 @@
> #include "target.h"
> #include "arch-utils.h"
> #include "regcache.h"
> -#include "osabi.h"
> +#include "mips-tdep.h"
>
> #include "opcode/mips.h"
> #include "elf/mips.h"
> @@ -57,19 +57,6 @@ enum
> MIPS_FPU_DOUBLE_REGSIZE = 8
> };
>
> -/* All the possible MIPS ABIs. */
> -
> -enum mips_abi
> - {
> - MIPS_ABI_UNKNOWN = 0,
> - MIPS_ABI_N32,
> - MIPS_ABI_O32,
> - MIPS_ABI_N64,
> - MIPS_ABI_O64,
> - MIPS_ABI_EABI32,
> - MIPS_ABI_EABI64,
> - MIPS_ABI_LAST
> - };
>
> static const char *mips_abi_string;
>
> @@ -105,17 +92,6 @@ static const char *size_enums[] = {
> 0
> };
>
> -/* Some MIPS boards don't support floating point while others only
> - support single-precision floating-point operations. See also
> - FP_REGISTER_DOUBLE. */
> -
> -enum mips_fpu_type
> - {
> - MIPS_FPU_DOUBLE, /* Full double precision floating point. */
> - MIPS_FPU_SINGLE, /* Single precision floating point (R4650). */
> - MIPS_FPU_NONE /* No floating point. */
> - };
> -
> #ifndef MIPS_DEFAULT_FPU_TYPE
> #define MIPS_DEFAULT_FPU_TYPE MIPS_FPU_DOUBLE
> #endif
> @@ -124,26 +100,6 @@ static enum mips_fpu_type mips_fpu_type
>
> static int mips_debug = 0;
>
> -/* MIPS specific per-architecture information */
> -struct gdbarch_tdep
> - {
> - /* from the elf header */
> - int elf_flags;
> -
> - /* mips options */
> - enum mips_abi mips_abi;
> - enum mips_abi found_abi;
> - enum mips_fpu_type mips_fpu_type;
> - int mips_last_arg_regnum;
> - int mips_last_fp_arg_regnum;
> - int mips_default_saved_regsize;
> - int mips_fp_register_double;
> - int mips_default_stack_argsize;
> - int gdb_target_is_mips64;
> - int default_mask_address_p;
> -
> - enum gdb_osabi osabi;
> - };
>
> #define MIPS_EABI (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI32 \
> || gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_EABI64)
> Index: mips-tdep.h
> ===================================================================
> RCS file: mips-tdep.h
> diff -N mips-tdep.h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ mips-tdep.h 4 Oct 2002 00:49:42 -0000
> @@ -0,0 +1,72 @@
> +/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
> +
> + Copyright 2002 Free Software Foundation, Inc.
> +
> + This file is part of GDB.
> +
> + This program is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 2 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with this program; if not, write to the Free Software
> + Foundation, Inc., 59 Temple Place - Suite 330,
> + Boston, MA 02111-1307, USA. */
> +
> +#ifndef MIPS_TDEP_H
> +#define MIPS_TDEP_H
> +
> +#include "osabi.h"
> +
> +/* All the possible MIPS ABIs. */
> +enum mips_abi
> + {
> + MIPS_ABI_UNKNOWN = 0,
> + MIPS_ABI_N32,
> + MIPS_ABI_O32,
> + MIPS_ABI_N64,
> + MIPS_ABI_O64,
> + MIPS_ABI_EABI32,
> + MIPS_ABI_EABI64,
> + MIPS_ABI_LAST
> + };
> +
> +/* Some MIPS boards don't support floating point while others only
> + support single-precision floating-point operations. See also
> + FP_REGISTER_DOUBLE. */
> +
> +enum mips_fpu_type
> + {
> + MIPS_FPU_DOUBLE, /* Full double precision floating point. */
> + MIPS_FPU_SINGLE, /* Single precision floating point (R4650). */
> + MIPS_FPU_NONE /* No floating point. */
> + };
> +
> +/* MIPS specific per-architecture information */
> +struct gdbarch_tdep
> + {
> + /* from the elf header */
> + int elf_flags;
> +
> + /* mips options */
> + enum mips_abi mips_abi;
> + enum mips_abi found_abi;
> + enum mips_fpu_type mips_fpu_type;
> + int mips_last_arg_regnum;
> + int mips_last_fp_arg_regnum;
> + int mips_default_saved_regsize;
> + int mips_fp_register_double;
> + int mips_default_stack_argsize;
> + int gdb_target_is_mips64;
> + int default_mask_address_p;
> +
> + enum gdb_osabi osabi;
> + };
> +
> +#endif /* MIPS_TDEP_H */
>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RFA] Create new file mips-tdep.h
2002-11-04 18:12 ` Andrew Cagney
@ 2002-12-04 21:21 ` Kevin Buettner
0 siblings, 0 replies; 7+ messages in thread
From: Kevin Buettner @ 2002-12-04 21:21 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Nov 4, 9:11pm, Andrew Cagney wrote:
> > I have some other changes under way in which I will need to know which
> > mips ABI is in use. I've moved struct gdbarch_tdep and the enums
> > that it depends upon into a new header file.
> >
> > Okay?
> >
> > * Makefile.in (mips_tdep_h): Define.
> > (mips-tdep.o): Remove osabi_h from dependency list. Add mips_tdep_h
> > to dependency list.
> > * mips-tdep.h: New file.
> > * mips-tdep.c (mips-tdep.h): Include.
> > (osabi.h): Don't include (since it's included by mips-tdep.h).
> > (enum mips_abi, enum_mips_fpu_type, struct gdbarch_tdep): Move
> > definitions to mips-tdep.h.
>
> Rather than publishing `struct gdbarch_tdep', can you instead just
> publish accessor methods for the parts you need? Otherwize ok.
Okay, I've just committed the patch below. I have some WIP patches
to mips-linux-tdep.c which use mips_abi().
* Makefile.in (mips_tdep_h): Define.
(mips-tdep.o): Add mips_tdep_h to dependency list.
* mips-tdep.h: New file.
* mips-tdep.c (mips-tdep.h): Include.
(enum mips_abi): Move to mips-tdep.h.
(mips_abi): New function.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.289
diff -u -p -r1.289 Makefile.in
--- Makefile.in 4 Dec 2002 23:00:14 -0000 1.289
+++ Makefile.in 5 Dec 2002 05:13:17 -0000
@@ -685,6 +685,7 @@ macrotab_h = macrotab.h
main_h = main.h
memattr_h = memattr.h
minimon_h = minimon.h
+mips_tdep_h = mips-tdep.h
mipsnbsd_tdep_h = mipsnbsd-tdep.h
monitor_h = monitor.h
nbsd_tdep_h = nbsd-tdep.h
@@ -1940,8 +1941,8 @@ mips-nat.o: mips-nat.c $(defs_h) $(infer
mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(value_h) $(gdbcmd_h) $(language_h) $(gdbcore_h) \
$(symfile_h) $(objfiles_h) $(gdbtypes_h) $(target_h) $(arch_utils_h) \
- $(regcache_h) $(osabi_h) $(opcode_mips_h) $(elf_mips_h) $(elf_bfd_h) \
- $(symcat_h)
+ $(regcache_h) $(osabi_h) $(mips_tdep_h) $(opcode_mips_h) \
+ $(elf_mips_h) $(elf_bfd_h) $(symcat_h)
mipsm3-nat.o: mipsm3-nat.c $(defs_h) $(inferior_h) $(regcache_h)
mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(mipsnbsd_tdep_h)
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.142
diff -u -p -r1.142 mips-tdep.c
--- mips-tdep.c 1 Dec 2002 19:07:15 -0000 1.142
+++ mips-tdep.c 5 Dec 2002 05:13:19 -0000
@@ -39,6 +39,7 @@
#include "arch-utils.h"
#include "regcache.h"
#include "osabi.h"
+#include "mips-tdep.h"
#include "opcode/mips.h"
#include "elf/mips.h"
@@ -57,19 +58,6 @@ enum
MIPS_FPU_DOUBLE_REGSIZE = 8
};
-/* All the possible MIPS ABIs. */
-
-enum mips_abi
- {
- MIPS_ABI_UNKNOWN = 0,
- MIPS_ABI_N32,
- MIPS_ABI_O32,
- MIPS_ABI_N64,
- MIPS_ABI_O64,
- MIPS_ABI_EABI32,
- MIPS_ABI_EABI64,
- MIPS_ABI_LAST
- };
static const char *mips_abi_string;
@@ -161,6 +149,13 @@ struct gdbarch_tdep
static const char *mips_saved_regsize_string = size_auto;
#define MIPS_SAVED_REGSIZE (mips_saved_regsize())
+
+/* Return the MIPS ABI associated with GDBARCH. */
+enum mips_abi
+mips_abi (struct gdbarch *gdbarch)
+{
+ return gdbarch_tdep (gdbarch)->mips_abi;
+}
static unsigned int
mips_saved_regsize (void)
Index: mips-tdep.h
===================================================================
RCS file: mips-tdep.h
diff -N mips-tdep.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ mips-tdep.h 5 Dec 2002 05:13:19 -0000
@@ -0,0 +1,41 @@
+/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger.
+
+ Copyright 2002 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef MIPS_TDEP_H
+#define MIPS_TDEP_H
+
+/* All the possible MIPS ABIs. */
+enum mips_abi
+ {
+ MIPS_ABI_UNKNOWN = 0,
+ MIPS_ABI_N32,
+ MIPS_ABI_O32,
+ MIPS_ABI_N64,
+ MIPS_ABI_O64,
+ MIPS_ABI_EABI32,
+ MIPS_ABI_EABI64,
+ MIPS_ABI_LAST
+ };
+
+/* Return the MIPS ABI associated with GDBARCH. */
+enum mips_abi mips_abi (struct gdbarch *gdbarch);
+
+#endif /* MIPS_TDEP_H */
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-12-05 5:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-03 18:03 [PATCH RFA] Create new file mips-tdep.h Kevin Buettner
2002-10-03 19:25 ` Daniel Jacobowitz
2002-10-21 12:08 ` Andrew Cagney
2002-10-21 12:15 ` Daniel Jacobowitz
2002-10-22 9:26 ` Kevin Buettner
2002-11-04 18:12 ` Andrew Cagney
2002-12-04 21:21 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox