Create new file mips-tdep.h.

This commit is contained in:
Kevin Buettner 2002-12-05 05:17:39 +00:00
parent d0112f7353
commit d1973055b8
4 changed files with 61 additions and 15 deletions

View File

@ -1,3 +1,12 @@
2002-12-04 Kevin Buettner <kevinb@redhat.com>
* 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.
2002-12-04 David Carlton <carlton@math.stanford.edu>
* Makefile.in (f-exp.tab.c): Don't depend on c-exp.tab.c.

View File

@ -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) $(inferior_h) $(gdbcore_h) $(regcache_h)
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)

View File

@ -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;
@ -162,6 +150,13 @@ 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)
{

41
gdb/mips-tdep.h Normal file
View File

@ -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 */