From 56756a5a286a45a23fcad02c47a63b1d2a9abf93 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Wed, 10 Nov 1993 19:32:22 +0000 Subject: [PATCH] * config/m68k/tm-m68k.h: Clean up CALL_DUMMY comment. * config/m68k/{tm-hp300bsd.h,tm-hp300hpux.h,tm-m68k-em.h, tm-monitor.h,tm-sun3.h,tm-vx68.h}, config/sparc/tm-sparc.h: Define BELIEVE_PCC_PROMOTION. --- gdb/ChangeLog | 5 +++++ gdb/config/m68k/tm-hp300bsd.h | 5 +++++ gdb/config/m68k/tm-hp300hpux.h | 6 ++++++ gdb/config/m68k/tm-m68k-em.h | 6 ++++++ gdb/config/m68k/tm-m68k.h | 6 ++---- gdb/config/m68k/tm-sun3.h | 8 ++++++-- gdb/config/m68k/tm-vx68.h | 6 ++++++ gdb/config/sparc/tm-sparc.h | 16 +++++----------- 8 files changed, 41 insertions(+), 17 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb3b116833..653d5c6ac5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ Wed Nov 10 09:31:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * config/m68k/tm-m68k.h: Clean up CALL_DUMMY comment. + * config/m68k/{tm-hp300bsd.h,tm-hp300hpux.h,tm-m68k-em.h, + tm-monitor.h,tm-sun3.h,tm-vx68.h}, config/sparc/tm-sparc.h: + Define BELIEVE_PCC_PROMOTION. + * dstread.c (dst_sym_fns): Update for flavours. * symfile.c (find_sym_fns): Add kludge for apollo like for rs/6000. * dstread.c (dst_symfile_offsets): Set objfile->num_sections. diff --git a/gdb/config/m68k/tm-hp300bsd.h b/gdb/config/m68k/tm-hp300bsd.h index 0e5bf90f44..d65a673f17 100644 --- a/gdb/config/m68k/tm-hp300bsd.h +++ b/gdb/config/m68k/tm-hp300bsd.h @@ -21,6 +21,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ including Utah, Mt. Xinu or Berkeley variants. This is NOT for HP-UX. Problems to hpbsd-bugs@cs.utah.edu. */ +/* GCC is the only compiler used on this OS. So get this right even if + the code which detects gcc2_compiled. is still broken. */ + +#define BELIEVE_PCC_PROMOTION 1 + /* Define BPT_VECTOR if it is different than the default. This is the vector number used by traps to indicate a breakpoint. */ diff --git a/gdb/config/m68k/tm-hp300hpux.h b/gdb/config/m68k/tm-hp300hpux.h index 0f5f23f7cf..6bd3f40a0b 100644 --- a/gdb/config/m68k/tm-hp300hpux.h +++ b/gdb/config/m68k/tm-hp300hpux.h @@ -17,6 +17,12 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* GCC is the only compiler used for stabs on this OS. So get this + right even if the code which detects gcc2_compiled. is still + broken. */ + +#define BELIEVE_PCC_PROMOTION 1 + /* Define BPT_VECTOR if it is different than the default. This is the vector number used by traps to indicate a breakpoint. */ diff --git a/gdb/config/m68k/tm-m68k-em.h b/gdb/config/m68k/tm-m68k-em.h index c4fc5ff1d0..87b981e15f 100644 --- a/gdb/config/m68k/tm-m68k-em.h +++ b/gdb/config/m68k/tm-m68k-em.h @@ -17,6 +17,12 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* 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 + #include "m68k/tm-m68k.h" /* Longjmp info comes from the Sun-3 machine description. Might as well diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 69988da322..0f4a1653c3 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -348,10 +348,8 @@ extern const struct ext_format ext_format_68881; actually exist on this target or not. */ /* FIXME: Wrong to hardwire this as BPT_VECTOR when sometimes it - should be REMOTE_BPT_VECTOR. We should be using - target_insert_breakpoint (but then I think we need - target_remove_breakpoint somewhere--easiest way to make this happen - is to make this breakpoint a real breakpoint.c type breakpoint). */ + should be REMOTE_BPT_VECTOR. Best way to fix it would be to define + CALL_DUMMY_BREAKPOINT_OFFSET. */ #define CALL_DUMMY {0xf227e0ff, 0x48e7fffc, 0x426742e7, 0x4eb93232, 0x3232dffc, 0x69696969, (0x4e404e71 | (BPT_VECTOR << 16))} #define CALL_DUMMY_LENGTH 28 /* Size of CALL_DUMMY */ diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h index 2d0432b3b1..716b194791 100644 --- a/gdb/config/m68k/tm-sun3.h +++ b/gdb/config/m68k/tm-sun3.h @@ -64,8 +64,12 @@ extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *)); #define SAVED_PC_AFTER_CALL(frame) \ m68k_saved_pc_after_call(frame) -/* If sun3 pcc says that a parameter is a short, it's a short. */ -#define BELIEVE_PCC_PROMOTION_TYPE +/* Sun /bin/cc gets this right as of SunOS 4.1.x. We need to define + BELIEVE_PCC_PROMOTION to get this right now that the code which + detects gcc2_compiled. is broken. This loses for SunOS 4.0.x and + earlier. */ + +#define BELIEVE_PCC_PROMOTION 1 /* The code which tries to deal with this bug is never harmful on a sun3. */ #define SUN_FIXED_LBRAC_BUG (0) diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h index 9eb6a4bfb2..092045e31b 100644 --- a/gdb/config/m68k/tm-vx68.h +++ b/gdb/config/m68k/tm-vx68.h @@ -22,6 +22,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define DEFAULT_PROMPT "(vxgdb) " +/* 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 + /* We have more complex, useful breakpoints on the target. */ #define DECR_PC_AFTER_BREAK 0 diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 4e8e183b2d..960ab75240 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -34,18 +34,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ register (i.e. it's the 7th or later argument). */ #define REG_STRUCT_HAS_ADDR(gcc_p) (gcc_p != 1) -/* If Pcc says that a parameter is a short, it's a short. This is - because the parameter does get passed in in a register as an int, - but pcc puts it onto the stack frame as a short (not nailing - whatever else might be there. I'm not sure that I consider this - swift. Sigh.) +/* Sun /bin/cc gets this right as of SunOS 4.1.x. We need to define + BELIEVE_PCC_PROMOTION to get this right now that the code which + detects gcc2_compiled. is broken. This loses for SunOS 4.0.x and + earlier. */ - No, don't do this. The problem here is that pcc says that the - argument is in the upper half of the word reserved on the stack, - but puts it in the lower half. */ -/* #define BELIEVE_PCC_PROMOTION 1 */ -/* OK, I've added code to dbxread.c to deal with this case. */ -#define BELIEVE_PCC_PROMOTION_TYPE +#define BELIEVE_PCC_PROMOTION 1 /* For acc, there's no need to correct LBRAC entries by guessing how they should work. In fact, this is harmful because the LBRAC