CVS: packaging/patches msp430-gdb-6.8-fix.patch, NONE, 1.1 msp430-gdb-6.8.patch, NONE, 1.1

Chris Liechti <[email protected]> Fri, 30 May 2008 17:43:12 -0700
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/packaging/patches
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7660

Added Files:
	msp430-gdb-6.8-fix.patch msp430-gdb-6.8.patch 
Log Message:
Raúl Sánchez Siles updated patches for msp430 support in gdb/insight


--- NEW FILE: msp430-gdb-6.8-fix.patch ---
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -221,7 +221,7 @@
 
 
 static const unsigned char *
-msp430_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+msp430_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 {
   static char breakpoint[] = {0x00, 0x00};
 
@@ -233,7 +233,7 @@
    when the reg_nr isn't valid. */
 
 static const char *
-msp430_register_name (int reg_nr)
+msp430_register_name (struct gdbarch *gdbarch, int reg_nr)
 {
   static char *register_names[] = {
     "r0", "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",
@@ -335,7 +335,7 @@
 }
 
 static CORE_ADDR
-msp430_skip_prologue (CORE_ADDR pc)
+msp430_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   CORE_ADDR func_addr, func_end, addr, stop;
   CORE_ADDR stack_size;
@@ -718,7 +718,7 @@
       /* The SP was moved to the FP.  This indicates that a new frame
          was created.  Get THIS frame's FP value by unwinding it from
          the next frame. */
-      frame_unwind_unsigned_register (next_frame, E_FP_REGNUM, &this_base);
+      this_base=frame_unwind_register_unsigned (next_frame, E_FP_REGNUM);
       /* The FP points at the last saved register.  Adjust the FP back
          to before the first saved register giving the SP. */
       prev_sp = this_base + info->size;
@@ -727,7 +727,7 @@
     {
       /* Assume that the FP is this frame's SP but with that pushed
          stack space added back. */
-      frame_unwind_unsigned_register (next_frame, E_SP_REGNUM, &this_base);
+      this_base=frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
       prev_sp = this_base + info->size;
     }
 
@@ -833,7 +833,7 @@
 msp430_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
   ULONGEST sp;
-  frame_unwind_unsigned_register (next_frame, E_SP_REGNUM, &sp);
+  sp=frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
   return sp;
 }
 
@@ -1071,7 +1071,7 @@
 msp430_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
 {
   ULONGEST pc;
-  frame_unwind_unsigned_register (next_frame, E_PC_REGNUM, &pc);
+  pc=frame_unwind_register_unsigned (next_frame, E_PC_REGNUM);
   return pc;
 }
 
@@ -1220,7 +1220,7 @@
   set_gdbarch_register_name (gdbarch, msp430_register_name);
   set_gdbarch_register_type (gdbarch, msp430_register_type);
 
-  set_gdbarch_extract_return_value (gdbarch, msp430_extract_return_value);
+  set_gdbarch_return_value (gdbarch, msp430_return_value);
   set_gdbarch_print_insn (gdbarch, print_insn_msp430);
 
   set_gdbarch_address_to_pointer (gdbarch, msp430_address_to_pointer);
@@ -1244,7 +1244,7 @@
   set_gdbarch_frame_args_skip (gdbarch, 0);
   /* set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); */
 
-  set_gdbarch_store_return_value (gdbarch, msp430_store_return_value);
+  /*set_gdbarch_store_return_value (gdbarch, msp430_store_return_value);*/
 
   set_gdbarch_frame_align (gdbarch, msp430_frame_align);
 
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -320,8 +320,14 @@
 	;;
 
 msp430-*-*)
-	gdb_target=msp430
-	gdb_multi_arch=yes
+	#gdb_target=msp430
+	#gdb_multi_arch=yes
+	#target-specific object files to use
+	gdb_target_obs="msp430-tdep.o"
+	#simulator library for target
+	gdb_sim=../sim/msp430/libsim.a
+	#set to "yes" if gdbserver supports target
+	build_gdbserver=no
 	;;
 
 mt-*-*)

--- NEW FILE: msp430-gdb-6.8.patch ---
diff -urNa --exclude debian gdb-6.8.org/bfd/archures.c gdb-6.8/bfd/archures.c
--- gdb-6.8.org/bfd/archures.c	2008-02-04 20:15:50.000000000 +0100
+++ gdb-6.8/bfd/archures.c	2008-05-22 19:43:17.000000000 +0200
@@ -380,7 +380,12 @@
 .#define bfd_mach_msp14          14
 .#define bfd_mach_msp15          15
 .#define bfd_mach_msp16          16
+.#define bfd_mach_msp20          20
 .#define bfd_mach_msp21          21
+.#define bfd_mach_msp22          22
+.#define bfd_mach_msp24          24
+.#define bfd_mach_msp241         241
+.#define bfd_mach_msp26          26
 .#define bfd_mach_msp31          31
 .#define bfd_mach_msp32          32
 .#define bfd_mach_msp33          33
diff -urNa --exclude debian gdb-6.8.org/bfd/bfd-in2.h gdb-6.8/bfd/bfd-in2.h
--- gdb-6.8.org/bfd/bfd-in2.h	2008-02-20 16:17:56.000000000 +0100
+++ gdb-6.8/bfd/bfd-in2.h	2008-05-22 19:43:17.000000000 +0200
[...11077 lines suppressed...]
+#define TARGET_EUNATCH 42
+#define TARGET_EUSERS 131
+#define TARGET_EWOULDBLOCK 11
+#define TARGET_EXDEV 18
+#define TARGET_EXFULL 52
+
+/* open flag values */
+#define TARGET_O_ACCMODE 0x3
+#define TARGET_O_APPEND 0x8
+#define TARGET_O_CREAT 0x200
+#define TARGET_O_EXCL 0x800
+#define TARGET_O_NOCTTY 0x8000
+#define TARGET_O_NONBLOCK 0x4000
+#define TARGET_O_RDONLY 0x0
+#define TARGET_O_RDWR 0x2
+#define TARGET_O_SYNC 0x2000
+#define TARGET_O_TRUNC 0x400
+#define TARGET_O_WRONLY 0x1
+
+#endif /* TARG_VALS_H */

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Mspgcc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-commits