1 |
grobian 09/06/21 10:38:26 |
2 |
|
3 |
Added: gdb-apple-563-darwin7.patch |
4 |
gdb-apple-768-texinfo.patch |
5 |
gdb-apple-962-darwin8.patch |
6 |
gdb-apple-768-darwin-arch.patch |
7 |
gdb-apple-563-no-64bit.patch |
8 |
Log: |
9 |
add sys-devel/gdb-apple from Gentoo Prefix tree |
10 |
(Portage version: 2.1.6.13/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: gdb-apple-563-darwin7.patch |
19 |
=================================================================== |
20 |
* Fabian Groffen <grobian@g.o> |
21 |
Mac OS X Panther (10.3) doesn't have mach_vm_size_t yet, and |
22 |
apparently this was forseen in macosx-nat-inferior-debug.c. However, |
23 |
macosx-nat-inferior-debug.h also uses the provided types, hence we |
24 |
move the backwards-compatibility logic to the .h file. |
25 |
|
26 |
* Fabian Groffen <grobian@g.o> |
27 |
On Mac OS X Panther (10.3) an older version of the Launch Services is |
28 |
available, which doesn't cover the requirements made by Xcode here. |
29 |
Because it's for Xcode only, and we don't use it on Gentoo, we just |
30 |
enable the functionality that doesn't compile on 10.3. |
31 |
|
32 |
--- gdb/macosx/macosx-nat-inferior-debug.c |
33 |
+++ gdb/macosx/macosx-nat-inferior-debug.c |
34 |
@@ -53,24 +53,6 @@ |
35 |
|
36 |
#include <AvailabilityMacros.h> |
37 |
|
38 |
-#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) |
39 |
- |
40 |
-#if MACH64 |
41 |
- |
42 |
-#include <mach/mach_vm.h> |
43 |
- |
44 |
-#else /* ! MACH64 */ |
45 |
- |
46 |
-#define mach_vm_size_t vm_size_t |
47 |
-#define mach_vm_address_t vm_address_t |
48 |
-#define mach_vm_read vm_read |
49 |
-#define mach_vm_write vm_write |
50 |
-#define mach_vm_region vm_region |
51 |
-#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT |
52 |
-#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO |
53 |
- |
54 |
-#endif /* MACH64 */ |
55 |
- |
56 |
FILE *inferior_stderr = NULL; |
57 |
int inferior_debug_flag = 0; |
58 |
int timestamps_debug_flag = 0; |
59 |
--- gdb/macosx/macosx-nat-inferior-debug.h |
60 |
+++ gdb/macosx/macosx-nat-inferior-debug.h |
61 |
@@ -6,6 +6,24 @@ |
62 |
|
63 |
#include "defs.h" |
64 |
|
65 |
+#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) |
66 |
+ |
67 |
+#if MACH64 |
68 |
+ |
69 |
+#include <mach/mach_vm.h> |
70 |
+ |
71 |
+#else /* ! MACH64 */ |
72 |
+ |
73 |
+#define mach_vm_size_t vm_size_t |
74 |
+#define mach_vm_address_t vm_address_t |
75 |
+#define mach_vm_read vm_read |
76 |
+#define mach_vm_write vm_write |
77 |
+#define mach_vm_region vm_region |
78 |
+#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT |
79 |
+#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO |
80 |
+ |
81 |
+#endif /* MACH64 */ |
82 |
+ |
83 |
extern FILE *inferior_stderr; |
84 |
extern int inferior_debug_flag; |
85 |
|
86 |
--- gdb/macosx/macosx-tdep.c |
87 |
+++ gdb/macosx/macosx-tdep.c |
88 |
@@ -413,6 +413,7 @@ |
89 |
} BabelAESelInfo; |
90 |
#pragma options align=reset |
91 |
|
92 |
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) |
93 |
static int |
94 |
open_file_with_LS (const char *file_path, int lineno) |
95 |
{ |
96 |
@@ -538,7 +539,9 @@ |
97 |
|
98 |
return 1; |
99 |
} |
100 |
+#endif |
101 |
|
102 |
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) |
103 |
/* Opens the file pointed to in ARGS with the default editor |
104 |
given by LaunchServices. If ARGS is NULL, opens the current |
105 |
source file & line. You can also supply file:line and it will |
106 |
@@ -609,6 +612,7 @@ |
107 |
|
108 |
open_file_with_LS (filename, line_no); |
109 |
} |
110 |
+#endif |
111 |
|
112 |
void |
113 |
_initialize_macosx_tdep () |
114 |
@@ -618,13 +622,15 @@ |
115 |
|
116 |
add_info ("trampoline", info_trampoline_command, |
117 |
"Resolve function for DYLD trampoline stub and/or Objective-C call"); |
118 |
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) |
119 |
c = add_com ("open", class_support, open_command, _("\ |
120 |
Open the named source file in an application determined by LaunchServices.\n\ |
121 |
With no arguments, open the currently selected source file.\n\ |
122 |
Also takes file:line to hilight the file at the given line.")); |
123 |
set_cmd_completer (c, filename_completer); |
124 |
add_com_alias ("op", "open", class_support, 1); |
125 |
add_com_alias ("ope", "open", class_support, 1); |
126 |
+#endif |
127 |
|
128 |
add_com ("flushstack", class_maintenance, stack_flush_command, |
129 |
"Force gdb to flush its stack-frame cache (maintainer command)"); |
130 |
|
131 |
|
132 |
|
133 |
1.1 sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch |
134 |
|
135 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch?rev=1.1&view=markup |
136 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch?rev=1.1&content-type=text/plain |
137 |
|
138 |
Index: gdb-apple-768-texinfo.patch |
139 |
=================================================================== |
140 |
--- src/Makefile.in |
141 |
+++ src/Makefile.in |
142 |
@@ -280,6 +280,6 @@ |
143 |
then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \ |
144 |
else if (${CONFIGURED_MAKEINFO} --version \ |
145 |
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ |
146 |
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \ |
147 |
then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` |
148 |
|
149 |
# This just becomes part of the MAKEINFO definition passed down to |
150 |
|
151 |
|
152 |
|
153 |
1.1 sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch |
154 |
|
155 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch?rev=1.1&view=markup |
156 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch?rev=1.1&content-type=text/plain |
157 |
|
158 |
Index: gdb-apple-962-darwin8.patch |
159 |
=================================================================== |
160 |
* 10.4 doesn't have posix spawn, but fortunately it's only used on ARM |
161 |
(iPhone), so we can still compile it |
162 |
|
163 |
--- src/gdb/macosx/macosx-nat-inferior.c |
164 |
+++ src/gdb/macosx/macosx-nat-inferior.c |
165 |
@@ -58,7 +58,9 @@ |
166 |
#include <sys/sysctl.h> |
167 |
#include <sys/proc.h> |
168 |
#include <mach/mach_error.h> |
169 |
+#ifdef TARGET_ARM |
170 |
#include <spawn.h> |
171 |
+#endif |
172 |
|
173 |
#include "macosx-nat-dyld.h" |
174 |
#include "macosx-nat-inferior.h" |
175 |
|
176 |
|
177 |
|
178 |
1.1 sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch |
179 |
|
180 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch?rev=1.1&view=markup |
181 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch?rev=1.1&content-type=text/plain |
182 |
|
183 |
Index: gdb-apple-768-darwin-arch.patch |
184 |
=================================================================== |
185 |
* configure checks for /usr/bin/arch to determine whether "arch" is ok |
186 |
to use, so don't rely on the path at runtime, since GNU arch doesn't |
187 |
understand -arch at all (and only returns the current arch name) |
188 |
|
189 |
--- src/gdb/fork-child.c |
190 |
+++ src/gdb/fork-child.c |
191 |
@@ -243,7 +243,7 @@ |
192 |
arch_string = "x86_64"; |
193 |
#endif |
194 |
if (arch_string != NULL) |
195 |
- sprintf (shell_command, "%s exec arch -arch %s ", shell_command, arch_string); |
196 |
+ sprintf (shell_command, "%s exec /usr/bin/arch -arch %s ", shell_command, arch_string); |
197 |
else |
198 |
strcat (shell_command, "exec "); |
199 |
} |
200 |
|
201 |
|
202 |
|
203 |
1.1 sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch |
204 |
|
205 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch?rev=1.1&view=markup |
206 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch?rev=1.1&content-type=text/plain |
207 |
|
208 |
Index: gdb-apple-563-no-64bit.patch |
209 |
=================================================================== |
210 |
* Fabian Groffen <grobian@g.o> |
211 |
On Gentoo, when the user doesn't have a 64-bits capable CPU, we |
212 |
compile GCC without multi-lib support. Hence, 64-bits defines are not |
213 |
available so we better not use them if we don't have __ppc64__ |
214 |
defined. |
215 |
|
216 |
--- gdb/macosx/macosx-nat-dyld.c |
217 |
+++ gdb/macosx/macosx-nat-dyld.c |
218 |
@@ -619,8 +619,10 @@ |
219 |
structures. */ |
220 |
if (header.cputype == CPU_TYPE_POWERPC || header.cputype == CPU_TYPE_I386) |
221 |
osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN; |
222 |
+#if defined(__ppc64__) |
223 |
if (header.cputype == CPU_TYPE_POWERPC64 || header.cputype == GDB_CPU_TYPE_X86_64) |
224 |
osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN64; |
225 |
+#endif |
226 |
} |
227 |
|
228 |
/* Once we know the address at which dyld was loaded, we can try to |