This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch] rename get_longjmp_target -> m68k_get_longjmp_target
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: Re: [patch] rename get_longjmp_target -> m68k_get_longjmp_target
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 08 Nov 2000 23:41:47 +1100
- References: <3A093E27.B7A99EDA@cygnus.com>
Andrew Cagney wrote:
>
> A mindless cleanup. Eliminates one small bit of namespace polution.
Oops, not so mindless. The attatched is also needed for when the target
doesn't know about longjmp.
Andrew
Wed Nov 8 23:08:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
* m68k-tdep.c (m68k_get_longjmp_target): Work around targets that
don't define JB_PC or JB_ELEMENT_SIZE.
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.8
diff -p -r1.8 m68k-tdep.c
*** m68k-tdep.c 2000/11/08 11:55:34 1.8
--- m68k-tdep.c 2000/11/08 12:10:03
*************** fill_fpregset (fpregset_t *fpregsetp, in
*** 642,650 ****
--- 642,656 ----
we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
This routine returns true on success. */
+ /* NOTE: cagney/2000-11-08: For this function to be fully
+ multi-arched the macro's JB_PC and JB_ELEMENT_SIZE would need to be
+ moved into the ``struct gdbarch_tdep'' object and then set on a
+ target ISA/ABI dependant basis. */
+
int
m68k_get_longjmp_target (CORE_ADDR *pc)
{
+ #if defined (JB_PC) && defined (JB_ELEMENT_SIZE)
char *buf;
CORE_ADDR sp, jb_addr;
*************** m68k_get_longjmp_target (CORE_ADDR *pc)
*** 665,670 ****
--- 671,680 ----
*pc = extract_address (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
return 1;
+ #else
+ internal_error ("m68k_get_longjmp_target: not implemented");
+ return 0;
+ #endif
}
/* Immediately after a function call, return the saved pc before the frame