summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/patches/gdb-6.6-rtems4.8-20090724.diff
blob: c9716c914bd8267b15ce79926e0793ff361740d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
diff -Naur gdb-6.6.orig/bfd/sysdep.h gdb-6.6/bfd/sysdep.h
--- gdb-6.6.orig/bfd/sysdep.h	2005-05-05 20:51:14.000000000 +0200
+++ gdb-6.6/bfd/sysdep.h	2009-07-24 08:13:48.000000000 +0200
@@ -135,7 +135,7 @@
 #endif
 
 #if !HAVE_DECL_STRSTR
-extern char *strstr ();
+/* extern char *strstr (); */
 #endif
 
 #ifdef HAVE_FTELLO
diff -Naur gdb-6.6.orig/configure gdb-6.6/configure
--- gdb-6.6.orig/configure	2006-11-15 00:26:39.000000000 +0100
+++ gdb-6.6/configure	2009-07-24 08:13:48.000000000 +0200
@@ -3679,7 +3679,7 @@
     # For an installed makeinfo, we require it to be from texinfo 4.4 or
     # higher, else we use the "missing" dummy.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
       :
     else
       MAKEINFO="$MISSING makeinfo"
diff -Naur gdb-6.6.orig/configure.in gdb-6.6/configure.in
--- gdb-6.6.orig/configure.in	2006-12-18 08:22:58.000000000 +0100
+++ gdb-6.6/configure.in	2009-07-24 08:13:48.000000000 +0200
@@ -2228,7 +2228,7 @@
     # For an installed makeinfo, we require it to be from texinfo 4.4 or
     # higher, else we use the "missing" dummy.
     if ${MAKEINFO} --version \
-       | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+       | egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
       :
     else
       MAKEINFO="$MISSING makeinfo"
diff -Naur gdb-6.6.orig/gdb/arch-utils.c gdb-6.6/gdb/arch-utils.c
--- gdb-6.6.orig/gdb/arch-utils.c	2006-11-10 20:20:35.000000000 +0100
+++ gdb-6.6/gdb/arch-utils.c	2009-07-24 08:13:48.000000000 +0200
@@ -349,6 +349,15 @@
 };
 static const char *set_endian_string;
 
+enum bfd_endian
+selected_byte_order (void)
+{
+  if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+    return TARGET_BYTE_ORDER;
+  else
+    return BFD_ENDIAN_UNKNOWN;
+}
+
 /* Called by ``show endian''.  */
 
 static void
diff -Naur gdb-6.6.orig/gdb/arch-utils.h gdb-6.6/gdb/arch-utils.h
--- gdb-6.6.orig/gdb/arch-utils.h	2006-11-10 20:20:35.000000000 +0100
+++ gdb-6.6/gdb/arch-utils.h	2009-07-24 08:13:48.000000000 +0200
@@ -126,6 +126,10 @@
 
 extern int legacy_register_sim_regno (int regnum);
 
+/* Return the selected byte order, or BFD_ENDIAN_UNKNOWN if no byte
+   order was explicitly selected.  */
+extern enum bfd_endian selected_byte_order (void);
+
 /* Return the selected architecture's name, or NULL if no architecture
    was explicitly selected.  */
 extern const char *selected_architecture_name (void);
diff -Naur gdb-6.6.orig/gdb/ChangeLog.rtems gdb-6.6/gdb/ChangeLog.rtems
--- gdb-6.6.orig/gdb/ChangeLog.rtems	1970-01-01 01:00:00.000000000 +0100
+++ gdb-6.6/gdb/ChangeLog.rtems	2009-07-24 08:13:48.000000000 +0200
@@ -0,0 +1,6 @@
+2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* arch-utils.c (selected_byte_order): New.
+	* arch-utils.h (selected_byte_order): New prototype.
+	* remote-sim.c (gdbsim_open): Use selected_byte_order.
+
diff -Naur gdb-6.6.orig/gdb/memory-map.c gdb-6.6/gdb/memory-map.c
--- gdb-6.6.orig/gdb/memory-map.c	2006-10-05 21:42:31.000000000 +0200
+++ gdb-6.6/gdb/memory-map.c	2009-07-24 08:13:48.000000000 +0200
@@ -141,10 +141,10 @@
 	{
 	  if (strcmp (data->property_name, "blocksize") == 0)
 	    {
+	      char *end = NULL;
 	      if (!data->character_data)
 		throw_error (XML_PARSE_ERROR,
 			     _("Empty content of 'property' element"));
-	      char *end = NULL;
 	      data->currently_parsing->attrib.blocksize
 		= strtoul (data->character_data, &end, 0);
 	      if (*end != '\0')
diff -Naur gdb-6.6.orig/gdb/remote-sim.c gdb-6.6/gdb/remote-sim.c
--- gdb-6.6.orig/gdb/remote-sim.c	2006-11-10 20:20:36.000000000 +0100
+++ gdb-6.6/gdb/remote-sim.c	2009-07-24 08:13:48.000000000 +0200
@@ -504,9 +504,9 @@
 	 + 50) /* slack */ ;
   arg_buf = (char *) alloca (len);
   strcpy (arg_buf, "gdbsim");	/* 7 */
-  /* Specify the byte order for the target when it is both selectable
-     and explicitly specified by the user (not auto detected). */
-  switch (TARGET_BYTE_ORDER)
+  /* Specify the byte order for the target when it is explicitly
+     specified by the user (not auto detected). */
+  switch (selected_byte_order ())
     {
     case BFD_ENDIAN_BIG:
       strcat (arg_buf, " -E big");
diff -Naur gdb-6.6.orig/sim/common/sim-signal.c gdb-6.6/sim/common/sim-signal.c
--- gdb-6.6.orig/sim/common/sim-signal.c	2005-11-29 03:43:06.000000000 +0100
+++ gdb-6.6/sim/common/sim-signal.c	2009-07-24 08:28:24.000000000 +0200
@@ -27,7 +27,7 @@
    to not think the process has died (so it can be debugged at the point of
    failure).  */
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 #ifndef SIGTRAP
 #define SIGTRAP 5
 #endif
diff -Naur gdb-6.6.orig/sim/erc32/erc32.c gdb-6.6/sim/erc32/erc32.c
--- gdb-6.6.orig/sim/erc32/erc32.c	1999-04-16 03:35:00.000000000 +0200
+++ gdb-6.6/sim/erc32/erc32.c	2009-07-24 08:13:48.000000000 +0200
@@ -413,7 +413,7 @@
     if (rom8) mec_memcfg &= ~0x20000;
     else mec_memcfg |= 0x20000;
 
-    mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
+    mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
     mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
 
     if (sparclite_board) {
diff -Naur gdb-6.6.orig/sim/erc32/exec.c gdb-6.6/sim/erc32/exec.c
--- gdb-6.6.orig/sim/erc32/exec.c	2005-03-07 12:09:05.000000000 +0100
+++ gdb-6.6/sim/erc32/exec.c	2009-07-24 08:13:48.000000000 +0200
@@ -1713,7 +1713,7 @@
     	    sregs->fdp[rs2 | 1] = sregs->fs[rs2 & ~1];
     	    sregs->fdp[rs2 & ~1] = sregs->fs[rs2 | 1];
     default:
-      ;
+      break;
     }
 #endif
 
@@ -1886,7 +1886,7 @@
 	sregs->fs[rd & ~1] = sregs->fdp[rd | 1];
 	sregs->fs[rd | 1] = sregs->fdp[rd & ~1];
     default:
-      ;
+      break;
     }
 #endif
     if (sregs->fpstate == FP_EXC_PE) {
diff -Naur gdb-6.6.orig/sim/ppc/ppc-instructions gdb-6.6/sim/ppc/ppc-instructions
--- gdb-6.6.orig/sim/ppc/ppc-instructions	2006-11-29 16:25:26.000000000 +0100
+++ gdb-6.6/sim/ppc/ppc-instructions	2009-07-24 08:13:48.000000000 +0200
@@ -3402,6 +3402,14 @@
 	    case spr_dec:
 	      *rT = cpu_get_decrementer(processor);
 	      break;
+		case spr_tbrl:
+	  	  if (is_64bit_implementation) *rT = TB;
+	  	  else                         *rT = EXTRACTED64(TB, 32, 63);
+		break;
+		case spr_tbru:
+	  	  if (is_64bit_implementation) *rT = EXTRACTED64(TB, 0, 31);
+		  else                         *rT = EXTRACTED64(TB, 0, 31);
+		break;
 	    case spr_tbu:
 	    case spr_tbl:
 	      /* NOTE - these SPR's are not readable. Use mftb[ul] */
diff -Naur gdb-6.6.orig/sim/ppc/ppc-spr-table gdb-6.6/sim/ppc/ppc-spr-table
--- gdb-6.6.orig/sim/ppc/ppc-spr-table	2003-06-22 18:48:12.000000000 +0200
+++ gdb-6.6/sim/ppc/ppc-spr-table	2009-07-24 08:13:48.000000000 +0200
@@ -32,6 +32,8 @@
 SRR0:26:0:0
 SRR1:27:0:0
 VRSAVE:256:0:0
+TBRL:268:0:0
+TBRU:269:0:0
 SPRG0:272:0:0
 SPRG1:273:0:0
 SPRG2:274:0:0