[commit] Remove config/m68k/tm-monitor.h

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit] Remove config/m68k/tm-monitor.h

Ulrich Weigand
Hello,

this patch removes the last remaining m68k TM file, tm-monitor.h.
The file contained two definitions:

#define BELIEVE_PCC_PROMOTION 1
is superfluous anyway due to the
  set_gdbarch_believe_pcc_promotion (gdbarch, 1);
call in m68k_gdbarch_init.

#define DECR_PC_AFTER_BREAK 0
*does* change the default behaviour of
  set_gdbarch_decr_pc_after_break (gdbarch, 2);
set in m68k_gdbarch_init.  That default is used for the Linux
and *BSD targets.  The patch moves the call from m68k_gdbarch_init
to m68kbsd_init_abi and m68k_linux_init_abi.  Then, the #define
becomes superfluous as well.

The patch should not change the behaviour on any m68k target.

Tested by making sure m68k-elf, m68k-linux, and m68k-netbsd
cross-GDBs still build.

Committed to mainline.

Bye,
Ulrich


ChangeLog:

        * config/m68k/tm-monitor.h: Delete file.
        * config/m68k/monitor.mt (DEPRECATED_TM_FILE): Remove.
        * m68k-tdep.c (m68k_gdbarch_init): set_gdbarch_decr_pc_after_break
        call moved to ...
        * m68kbsd-tdep.c (m68kbsd_init_abi): ... here and ...
        * m68klinux-tdep.c (m68k_linux_init_abi): ... here.

diff -urNp gdb-orig/gdb/config/m68k/monitor.mt gdb-head/gdb/config/m68k/monitor.mt
--- gdb-orig/gdb/config/m68k/monitor.mt 2007-03-29 23:18:07.855028000 +0200
+++ gdb-head/gdb/config/m68k/monitor.mt 2007-03-29 23:20:44.551039144 +0200
@@ -1,3 +1,2 @@
 # Target: Motorola m68k embedded (e.g. bug monitors)
 TDEPFILES= m68k-tdep.o monitor.o dbug-rom.o dsrec.o
-DEPRECATED_TM_FILE= tm-monitor.h
diff -urNp gdb-orig/gdb/config/m68k/tm-monitor.h gdb-head/gdb/config/m68k/tm-monitor.h
--- gdb-orig/gdb/config/m68k/tm-monitor.h 2007-03-29 23:18:18.043077000 +0200
+++ gdb-head/gdb/config/m68k/tm-monitor.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-/* Target machine definitions for a generic m68k monitor/emulator.
-   Copyright 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1998, 1999, 2003, 2007
-   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.  */
-
-/* The definitions here are appropriate for several embedded m68k-based
-   targets, including IDP (rom68k), BCC (cpu32bug), and EST's emulator.  */
-
-/* GCC is probably the only compiler used on this configuration.  So
-   get this right even if the code which detects gcc2_compiled. is
-   still broken.  */
-
-#define BELIEVE_PCC_PROMOTION 1
-
-/* The target system handles breakpoints.  */
-
-#define DECR_PC_AFTER_BREAK 0
-
-/* No float registers.  */
-
-/*#define NUM_REGS 18 */
-
-/* FIXME, should do GET_LONGJMP_TARGET for newlib.  */
diff -urNp gdb-orig/gdb/m68kbsd-tdep.c gdb-head/gdb/m68kbsd-tdep.c
--- gdb-orig/gdb/m68kbsd-tdep.c 2007-03-29 23:18:07.847029000 +0200
+++ gdb-head/gdb/m68kbsd-tdep.c 2007-03-29 23:20:44.542040512 +0200
@@ -193,6 +193,8 @@ m68kbsd_init_abi (struct gdbarch_info in
   tdep->jb_pc = 5;
   tdep->jb_elt_size = 4;
 
+  set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
   set_gdbarch_regset_from_core_section
     (gdbarch, m68kbsd_regset_from_core_section);
 }
diff -urNp gdb-orig/gdb/m68klinux-tdep.c gdb-head/gdb/m68klinux-tdep.c
--- gdb-orig/gdb/m68klinux-tdep.c 2007-03-29 23:18:07.851029000 +0200
+++ gdb-head/gdb/m68klinux-tdep.c 2007-03-29 23:20:44.546039904 +0200
@@ -294,6 +294,8 @@ m68k_linux_init_abi (struct gdbarch_info
   tdep->struct_value_regnum = M68K_A1_REGNUM;
   tdep->struct_return = reg_struct_return;
 
+  set_gdbarch_decr_pc_after_break (gdbarch, 2);
+
   frame_unwind_append_sniffer (gdbarch, m68k_linux_sigtramp_frame_sniffer);
 
   /* Shared library handling.  */
diff -urNp gdb-orig/gdb/m68k-tdep.c gdb-head/gdb/m68k-tdep.c
--- gdb-orig/gdb/m68k-tdep.c 2007-03-29 23:18:07.803036000 +0200
+++ gdb-head/gdb/m68k-tdep.c 2007-03-29 23:20:44.501046744 +0200
@@ -1168,7 +1168,6 @@ m68k_gdbarch_init (struct gdbarch_info i
   set_gdbarch_frame_align (gdbarch, m68k_frame_align);
 
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
-  set_gdbarch_decr_pc_after_break (gdbarch, 2);
 
   set_gdbarch_frame_args_skip (gdbarch, 8);
   set_gdbarch_dwarf_reg_to_regnum (gdbarch, m68k_dwarf_reg_to_regnum);
--
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [commit] Remove config/m68k/tm-monitor.h

Daniel Jacobowitz-2
On Fri, Apr 13, 2007 at 01:05:28AM +0200, Ulrich Weigand wrote:
> #define DECR_PC_AFTER_BREAK 0
> *does* change the default behaviour of
>   set_gdbarch_decr_pc_after_break (gdbarch, 2);
> set in m68k_gdbarch_init.  That default is used for the Linux
> and *BSD targets.  The patch moves the call from m68k_gdbarch_init
> to m68kbsd_init_abi and m68k_linux_init_abi.  Then, the #define
> becomes superfluous as well.
>
> The patch should not change the behaviour on any m68k target.

Thanks.

We have an unsubmitted m68k-like target (Innovasic's "fido" processor)
which used to override this in its own tm.h, because using JTAG to
talk to it results in the architecture-standard behavior (i.e. GDB has
to take care of DECR_PC_AFTER_BREAK itself, i.e. should be 2).  Does
anyone currently use the m68k-elf targets to talk to something where
the setting of 0 is correct - some monitor, maybe?

Hmm, it occurs to me I should check our ColdFire JTAG port too.  Maybe
it's a difference between the two JTAG units.

--
Daniel Jacobowitz
CodeSourcery