1 |
grobian 11/04/03 09:52:07 |
2 |
|
3 |
Added: gdb-apple-1518-task_dyld_info.patch |
4 |
gdb-apple-1518-darwin8.patch |
5 |
Log: |
6 |
Version bump to version from Developer Tools 4.0 |
7 |
|
8 |
(Portage version: 2.2.01.18213-prefix/cvs/Darwin powerpc) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: gdb-apple-1518-task_dyld_info.patch |
17 |
=================================================================== |
18 |
If dyld-info is not available, don't try to compile unreachable code |
19 |
using it either. |
20 |
|
21 |
--- gdb-1518/src/gdb/macosx/macosx-nat-dyld.c |
22 |
+++ gdb-1518/src/gdb/macosx/macosx-nat-dyld.c |
23 |
@@ -779,7 +779,7 @@ |
24 |
{ |
25 |
#if !defined (TASK_DYLD_INFO) |
26 |
return 0; |
27 |
-#endif |
28 |
+#else |
29 |
if (macosx_status->task == TASK_NULL) |
30 |
return 0; |
31 |
|
32 |
@@ -799,6 +799,7 @@ |
33 |
task_dyld_info.all_image_info_size == 0) |
34 |
return 0; |
35 |
s->dyld_image_infos = task_dyld_info.all_image_info_addr; |
36 |
+#endif /* TASK_DYLD_INFO */ |
37 |
} |
38 |
#endif /* NM_NEXTSTEP */ |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: gdb-apple-1518-darwin8.patch |
49 |
=================================================================== |
50 |
--- src/gdb/macosx/macosx-nat-inferior.c |
51 |
+++ src/gdb/macosx/macosx-nat-inferior.c |
52 |
@@ -60,13 +60,17 @@ |
53 |
#include <sys/sysctl.h> |
54 |
#include <sys/proc.h> |
55 |
#include <mach/mach_error.h> |
56 |
+#if defined(TARGET_ARM) |
57 |
#include <spawn.h> |
58 |
+#endif |
59 |
|
60 |
#include <semaphore.h> |
61 |
|
62 |
#include <dlfcn.h> |
63 |
+#if 0 |
64 |
#include <libproc.h> |
65 |
#include <sys/proc_info.h> |
66 |
+#endif |
67 |
|
68 |
#include "macosx-nat-dyld.h" |
69 |
#include "macosx-nat-inferior.h" |
70 |
@@ -2692,6 +2692,7 @@ |
71 |
if (tp->private == NULL || tp->private->app_thread_port == 0) |
72 |
return NULL; |
73 |
|
74 |
+#ifdef THREAD_IDENTIFIER_INFO_COUNT |
75 |
thread_identifier_info_data_t tident; |
76 |
unsigned int info_count; |
77 |
kern_return_t kret; |
78 |
@@ -2719,6 +2720,7 @@ |
79 |
} |
80 |
} |
81 |
} |
82 |
+#endif |
83 |
return buf; |
84 |
} |
85 |
|
86 |
--- src/gdb/macosx/macosx-nat-info.c |
87 |
+++ src/gdb/macosx/macosx-nat-info.c |
88 |
@@ -45,6 +45,22 @@ |
89 |
#include "macosx-nat-inferior.h" |
90 |
#include "macosx-nat-inferior-debug.h" |
91 |
|
92 |
+#ifdef __ppc__ |
93 |
+#ifndef __darwin_ppc_thread_state |
94 |
+#define __darwin_ppc_thread_state ppc_thread_state |
95 |
+#define __r0 r0 |
96 |
+#define __srr0 srr0 |
97 |
+#define __srr1 srr1 |
98 |
+#define __cr cr |
99 |
+#define __xer xer |
100 |
+#define __lr lr |
101 |
+#define __ctr ctr |
102 |
+#endif |
103 |
+#ifndef __darwin_ppc_exception_state |
104 |
+#define __darwin_ppc_exception_state ppc_exception_state |
105 |
+#endif |
106 |
+#endif |
107 |
+ |
108 |
extern macosx_inferior_status *macosx_status; |
109 |
|
110 |
#define CHECK_ARGS(what, args) \ |
111 |
--- src/gdb/macosx/macosx-nat-infthread.c |
112 |
+++ src/gdb/macosx/macosx-nat-infthread.c |
113 |
@@ -36,8 +36,10 @@ |
114 |
#include <sys/dir.h> |
115 |
#include <inttypes.h> |
116 |
|
117 |
+#if 0 |
118 |
#include <libproc.h> |
119 |
#include <sys/proc_info.h> |
120 |
+#endif |
121 |
|
122 |
#include "macosx-nat-inferior.h" |
123 |
#include "macosx-nat-inferior-util.h" |
124 |
@@ -809,6 +809,7 @@ |
125 |
print_stack_frame (get_selected_frame (NULL), 0, LOCATION); |
126 |
switch_to_thread (current_ptid); |
127 |
|
128 |
+#ifdef THREAD_IDENTIFIER_INFO_COUNT |
129 |
thread_identifier_info_data_t tident; |
130 |
info_count = THREAD_IDENTIFIER_INFO_COUNT; |
131 |
kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, |
132 |
@@ -878,6 +879,7 @@ |
133 |
printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority); |
134 |
printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority); |
135 |
} |
136 |
+#endif |
137 |
|
138 |
printf_filtered ("\tsuspend count: %d", info.suspend_count); |
139 |
|
140 |
@@ -1175,6 +1177,7 @@ |
141 |
ui_out_field_fmt (uiout, "mach-port-number", "0x%s", |
142 |
paddr_nz (app_thread_name)); |
143 |
|
144 |
+#ifdef THREAD_IDENTIFIER_INFO_COUNT |
145 |
thread_identifier_info_data_t tident; |
146 |
info_count = THREAD_IDENTIFIER_INFO_COUNT; |
147 |
kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, |
148 |
@@ -1207,6 +1210,7 @@ |
149 |
paddr_nz (struct_addr)); |
150 |
} |
151 |
} |
152 |
+#endif |
153 |
} |
154 |
|
155 |
|
156 |
--- src/gdb/macosx/macosx-tdep.c |
157 |
+++ src/gdb/macosx/macosx-tdep.c |
158 |
@@ -64,7 +64,6 @@ |
159 |
#include "gdbcore.h" |
160 |
|
161 |
#include <dirent.h> |
162 |
-#include <libgen.h> |
163 |
#include <sys/types.h> |
164 |
#include <sys/stat.h> |
165 |
#include <sys/param.h> |
166 |
--- src/gdb/remote.c |
167 |
+++ src/gdb/remote.c |
168 |
@@ -63,7 +63,6 @@ |
169 |
#include "macosx-nat-dyld.h" |
170 |
#include "macosx-nat-dyld-process.h" |
171 |
#endif |
172 |
-#include <execinfo.h> |
173 |
|
174 |
/* Prototypes for local functions. */ |
175 |
static void cleanup_sigint_signal_handler (void *dummy); |
176 |
@@ -475,11 +474,13 @@ |
177 |
static void |
178 |
remote_backtrace_self (const char *message) |
179 |
{ |
180 |
+#if 0 |
181 |
void *bt_buffer[100]; |
182 |
int count = backtrace (bt_buffer, 100); |
183 |
if (message && message[0]) |
184 |
fprintf_filtered (gdb_stderr, "%s", message); |
185 |
backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); |
186 |
+#endif |
187 |
} |
188 |
|
189 |
static void |
190 |
--- src/gdb/symfile.c |
191 |
+++ src/gdb/symfile.c |
192 |
@@ -67,7 +67,6 @@ |
193 |
#include <ctype.h> |
194 |
#include <time.h> |
195 |
#include <sys/time.h> |
196 |
-#include <libgen.h> |
197 |
|
198 |
#include <sys/mman.h> |
199 |
|
200 |
--- src/gdb/utils.c |
201 |
+++ src/gdb/utils.c |
202 |
@@ -28,7 +28,6 @@ |
203 |
#include "event-top.h" |
204 |
#include "exceptions.h" |
205 |
#include "bfd.h" |
206 |
-#include <execinfo.h> |
207 |
#include <sys/resource.h> |
208 |
#include <uuid/uuid.h> |
209 |
|
210 |
@@ -879,6 +878,7 @@ |
211 |
target_terminal_ours (); |
212 |
begin_line (); |
213 |
|
214 |
+#if 0 |
215 |
/* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely |
216 |
to get useful bug reports. */ |
217 |
{ |
218 |
@@ -887,6 +887,7 @@ |
219 |
fprintf (stderr, "gdb stack crawl at point of internal error:\n"); |
220 |
backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); |
221 |
} |
222 |
+#endif |
223 |
|
224 |
/* Create a string containing the full error/warning message. Need |
225 |
to call query with this full string, as otherwize the reason |
226 |
--- src/gdb/macosx/macosx-nat-dyld.c |
227 |
+++ src/gdb/macosx/macosx-nat-dyld.c |
228 |
@@ -2083,7 +2083,9 @@ |
229 |
case MH_DYLIB: |
230 |
case MH_DYLINKER: |
231 |
case MH_BUNDLE: |
232 |
+#ifdef MH_KEXT_BUNDLE |
233 |
case MH_KEXT_BUNDLE: |
234 |
+#endif |
235 |
break; |
236 |
case MH_FVMLIB: |
237 |
case MH_PRELOAD: |
238 |
@@ -2412,7 +2414,9 @@ |
239 |
break; |
240 |
case MH_DYLINKER: |
241 |
case MH_BUNDLE: |
242 |
+#ifdef MH_KEXT_BUNDLE |
243 |
case MH_KEXT_BUNDLE: |
244 |
+#endif |
245 |
entry->reason = dyld_reason_dyld; |
246 |
break; |
247 |
default: |
248 |
--- src/gdb/macosx/macosx-nat-dyld-process.c |
249 |
+++ src/gdb/macosx/macosx-nat-dyld-process.c |
250 |
@@ -407,7 +407,9 @@ |
251 |
case MH_DYLIB: |
252 |
break; |
253 |
case MH_BUNDLE: |
254 |
+#ifdef MH_KEXT_BUNDLE |
255 |
case MH_KEXT_BUNDLE: |
256 |
+#endif |
257 |
break; |
258 |
default: |
259 |
return; |
260 |
return; |