This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Remove unused function in irix5-nat.c


Hello,

this removes another never-used function, get_longjmp_target in irix5-nat.c.

This hasn't been used in a while; to properly support longjmp on irix 
gdbarch support needs to be added to mips-irix-tdep.c instead.

Committed to mainline.

Bye,
Ulrich

ChangeLog:

	* irix5-nat.c (JB_ELEMENT_SIZE, get_longjmp_target): Remove.


diff -urNp gdb-orig/gdb/irix5-nat.c gdb-head/gdb/irix5-nat.c
--- gdb-orig/gdb/irix5-nat.c	2007-05-09 18:18:44.000000000 +0200
+++ gdb-head/gdb/irix5-nat.c	2007-05-13 15:24:33.121107564 +0200
@@ -43,9 +43,6 @@
 static void fetch_core_registers (struct regcache *, char *,
 				  unsigned int, int, CORE_ADDR);
 
-/* Size of elements in jmpbuf */
-
-#define JB_ELEMENT_SIZE 4
 
 /*
  * See the comment in m68k-tdep.c regarding the utility of these functions.
@@ -206,29 +203,6 @@ fill_fpregset (const struct regcache *re
 }
 
 
-/* Figure out where the longjmp will land.
-   We expect the first arg to be a pointer to the jmp_buf structure from which
-   we extract the pc (JB_PC) that we will land at.  The pc is copied into PC.
-   This routine returns true on success. */
-
-int
-get_longjmp_target (CORE_ADDR *pc)
-{
-  char *buf;
-  CORE_ADDR jb_addr;
-
-  buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT);
-  jb_addr = read_register (MIPS_A0_REGNUM);
-
-  if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf,
-			  TARGET_PTR_BIT / TARGET_CHAR_BIT))
-    return 0;
-
-  *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT);
-
-  return 1;
-}
-
 /* Provide registers to GDB from a core file.
 
    CORE_REG_SECT points to an array of bytes, which were obtained from
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]