diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-devel/gdb-apple/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-devel/gdb-apple/files')
15 files changed, 760 insertions, 0 deletions
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch new file mode 100644 index 000000000000..c95f02e0fe2e --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch @@ -0,0 +1,131 @@ +--- src/gdb/symfile.c.orig 2009-09-25 09:00:15 +0200 ++++ src/gdb/symfile.c 2009-09-25 09:00:18 +0200 +@@ -67,7 +67,6 @@ + #include <ctype.h> + #include <time.h> + #include <sys/time.h> +-#include <libgen.h> + + #include <sys/mman.h> + +--- src/gdb/utils.c.orig 2009-09-25 09:06:29 +0200 ++++ src/gdb/utils.c 2009-09-25 09:46:24 +0200 +@@ -27,7 +27,6 @@ + #include "gdb_string.h" + #include "event-top.h" + #include "exceptions.h" +-#include <execinfo.h> + + #ifdef TUI + #include "tui/tui.h" /* For tui_get_command_dimension. */ +@@ -878,6 +877,7 @@ + target_terminal_ours (); + begin_line (); + ++#if 0 + /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely + to get useful bug reports. */ + { +@@ -886,6 +886,7 @@ + fprintf (stderr, "gdb stack crawl at point of internal error:\n"); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); + } ++#endif + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason +--- src/gdb/remote.c.orig 2009-09-25 09:31:58 +0200 ++++ src/gdb/remote.c 2009-09-25 09:48:18 +0200 +@@ -61,7 +61,6 @@ + #ifdef MACOSX_DYLD + #include "macosx-nat-dyld.h" + #endif +-#include <execinfo.h> + + /* Prototypes for local functions. */ + static void cleanup_sigint_signal_handler (void *dummy); +@@ -483,10 +482,12 @@ + static void + remote_backtrace_self () + { ++#if 0 + void *bt_buffer[10]; + int count = backtrace (bt_buffer, 10); + fprintf_filtered (gdb_stderr, "gdb stack crawl at point of invalid hex digit:\n"); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); ++#endif + } + + static void +--- src/gdb/macosx/macosx-tdep.c.orig 2009-09-25 09:09:00 +0200 ++++ src/gdb/macosx/macosx-tdep.c 2009-09-25 09:09:12 +0200 +@@ -61,7 +61,6 @@ + #include "exceptions.h" + + #include <dirent.h> +-#include <libgen.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/param.h> +--- src/gdb/macosx/macosx-nat-inferior.c.orig 2009-09-25 09:12:44 +0200 ++++ src/gdb/macosx/macosx-nat-inferior.c 2009-09-25 09:13:24 +0200 +@@ -62,8 +62,10 @@ + #include <semaphore.h> + + #include <dlfcn.h> ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-dyld.h" + #include "macosx-nat-inferior.h" +@@ -3261,8 +3263,10 @@ + int_flags |= RTLD_NOLOAD; + if (strstr (flags, "RTLD_NODELETE") != NULL) + int_flags |= RTLD_NODELETE; ++#ifdef RTLD_FIRST + if (strstr (flags, "RTLD_FIRST") != NULL) + int_flags |= RTLD_FIRST; ++#endif + } + + /* If the user didn't pass in anything, set some sensible defaults. */ +--- src/gdb/macosx/macosx-nat-infthread.c.orig 2009-09-25 09:14:01 +0200 ++++ src/gdb/macosx/macosx-nat-infthread.c 2009-09-25 09:14:19 +0200 +@@ -36,8 +36,10 @@ + #include <sys/dir.h> + #include <inttypes.h> + ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-util.h" +--- src/gdb/macosx/macosx-nat-info.c.orig 2009-09-25 09:16:50 +0200 ++++ src/gdb/macosx/macosx-nat-info.c 2009-09-25 09:31:12 +0200 +@@ -45,6 +45,22 @@ + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-debug.h" + ++#ifdef __ppc__ ++#ifndef __darwin_ppc_thread_state ++#define __darwin_ppc_thread_state ppc_thread_state ++#define __r0 r0 ++#define __srr0 srr0 ++#define __srr1 srr1 ++#define __cr cr ++#define __xer xer ++#define __lr lr ++#define __ctr ctr ++#endif ++#ifndef __darwin_ppc_exception_state ++#define __darwin_ppc_exception_state ppc_exception_state ++#endif ++#endif ++ + extern macosx_inferior_status *macosx_status; + + #define CHECK_ARGS(what, args) \ diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch new file mode 100644 index 000000000000..40ef761e8f70 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch @@ -0,0 +1,128 @@ +--- gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c ++++ gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c +@@ -60,13 +60,17 @@ + #include <sys/sysctl.h> + #include <sys/proc.h> + #include <mach/mach_error.h> ++#if defined(TARGET_ARM) + #include <spawn.h> ++#endif + + #include <semaphore.h> + + #include <dlfcn.h> ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-dyld.h" + #include "macosx-nat-inferior.h" +--- gdb-1461.2/src/gdb/macosx/macosx-nat-info.c ++++ gdb-1461.2/src/gdb/macosx/macosx-nat-info.c +@@ -45,6 +45,22 @@ + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-debug.h" + ++#ifdef __ppc__ ++#ifndef __darwin_ppc_thread_state ++#define __darwin_ppc_thread_state ppc_thread_state ++#define __r0 r0 ++#define __srr0 srr0 ++#define __srr1 srr1 ++#define __cr cr ++#define __xer xer ++#define __lr lr ++#define __ctr ctr ++#endif ++#ifndef __darwin_ppc_exception_state ++#define __darwin_ppc_exception_state ppc_exception_state ++#endif ++#endif ++ + extern macosx_inferior_status *macosx_status; + + #define CHECK_ARGS(what, args) \ +--- gdb-1461.2/src/gdb/macosx/macosx-nat-infthread.c ++++ gdb-1461.2/src/gdb/macosx/macosx-nat-infthread.c +@@ -36,8 +36,10 @@ + #include <sys/dir.h> + #include <inttypes.h> + ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-util.h" +--- gdb-1461.2/src/gdb/macosx/macosx-tdep.c ++++ gdb-1461.2/src/gdb/macosx/macosx-tdep.c +@@ -63,7 +63,6 @@ + #include "gdbcore.h" + + #include <dirent.h> +-#include <libgen.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/param.h> +--- gdb-1461.2/src/gdb/remote.c ++++ gdb-1461.2/src/gdb/remote.c +@@ -62,7 +62,6 @@ + #include "macosx-nat-dyld.h" + #include "macosx-nat-dyld-process.h" + #endif +-#include <execinfo.h> + + /* Prototypes for local functions. */ + static void cleanup_sigint_signal_handler (void *dummy); +@@ -474,11 +473,13 @@ + static void + remote_backtrace_self (const char *message) + { ++#if 0 + void *bt_buffer[100]; + int count = backtrace (bt_buffer, 100); + if (message && message[0]) + fprintf_filtered (gdb_stderr, "%s", message); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); ++#endif + } + + static void +--- gdb-1461.2/src/gdb/symfile.c ++++ gdb-1461.2/src/gdb/symfile.c +@@ -67,7 +67,6 @@ + #include <ctype.h> + #include <time.h> + #include <sys/time.h> +-#include <libgen.h> + + #include <sys/mman.h> + +--- gdb-1461.2/src/gdb/utils.c ++++ gdb-1461.2/src/gdb/utils.c +@@ -27,7 +27,6 @@ + #include "gdb_string.h" + #include "event-top.h" + #include "exceptions.h" +-#include <execinfo.h> + + #ifdef TUI + #include "tui/tui.h" /* For tui_get_command_dimension. */ +@@ -874,6 +873,7 @@ + target_terminal_ours (); + begin_line (); + ++#if 0 + /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely + to get useful bug reports. */ + { +@@ -882,6 +882,7 @@ + fprintf (stderr, "gdb stack crawl at point of internal error:\n"); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); + } ++#endif + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch new file mode 100644 index 000000000000..75b910432278 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch @@ -0,0 +1,22 @@ +If dyld-info is not available, don't try to compile unreachable code +using it either. + +--- gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c ++++ gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c +@@ -731,7 +731,7 @@ + { + #if !defined (TASK_DYLD_INFO) || !defined (NM_NEXTSTEP) + return 0; +-#endif ++#else + + if (target_is_remote () || value == NULL) + return 0; +@@ -791,6 +791,7 @@ + } + #endif /* NM_NEXTSTEP */ + return 0; ++#endif + } + + /* Searches the target address space for dyld itself, returning it in diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch new file mode 100644 index 000000000000..a05169cec25d --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch @@ -0,0 +1,87 @@ +--- src/gdb/macosx/macosx-nat-dyld.c ++++ src/gdb/macosx/macosx-nat-dyld.c +@@ -2083,7 +2083,9 @@ + case MH_DYLIB: + case MH_DYLINKER: + case MH_BUNDLE: ++#ifdef MH_KEXT_BUNDLE + case MH_KEXT_BUNDLE: ++#endif + break; + case MH_FVMLIB: + case MH_PRELOAD: +@@ -2412,7 +2414,9 @@ + break; + case MH_DYLINKER: + case MH_BUNDLE: ++#ifdef MH_KEXT_BUNDLE + case MH_KEXT_BUNDLE: ++#endif + entry->reason = dyld_reason_dyld; + break; + default: +--- src/gdb/macosx/macosx-nat-dyld-process.c ++++ src/gdb/macosx/macosx-nat-dyld-process.c +@@ -407,7 +407,9 @@ + case MH_DYLIB: + break; + case MH_BUNDLE: ++#ifdef MH_KEXT_BUNDLE + case MH_KEXT_BUNDLE: ++#endif + break; + default: + return; + return; +--- src/gdb/macosx/macosx-nat-inferior.c ++++ src/gdb/macosx/macosx-nat-inferior.c +@@ -2692,6 +2692,7 @@ + if (tp->private == NULL || tp->private->app_thread_port == 0) + return NULL; + ++#ifdef THREAD_IDENTIFIER_INFO_COUNT + thread_identifier_info_data_t tident; + unsigned int info_count; + kern_return_t kret; +@@ -2719,6 +2720,7 @@ + } + } + } ++#endif + return buf; + } + +--- src/gdb/macosx/macosx-nat-infthread.c ++++ src/gdb/macosx/macosx-nat-infthread.c +@@ -809,6 +809,7 @@ + print_stack_frame (get_selected_frame (NULL), 0, LOCATION); + switch_to_thread (current_ptid); + ++#ifdef THREAD_IDENTIFIER_INFO_COUNT + thread_identifier_info_data_t tident; + info_count = THREAD_IDENTIFIER_INFO_COUNT; + kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, +@@ -878,6 +879,7 @@ + printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority); + printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority); + } ++#endif + + printf_filtered ("\tsuspend count: %d", info.suspend_count); + +@@ -1175,6 +1177,7 @@ + ui_out_field_fmt (uiout, "mach-port-number", "0x%s", + paddr_nz (app_thread_name)); + ++#ifdef THREAD_IDENTIFIER_INFO_COUNT + thread_identifier_info_data_t tident; + info_count = THREAD_IDENTIFIER_INFO_COUNT; + kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident, +@@ -1207,6 +1210,7 @@ + paddr_nz (struct_addr)); + } + } ++#endif + } + + diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch new file mode 100644 index 000000000000..f8ecc30be7f6 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch @@ -0,0 +1,128 @@ +--- src/gdb/macosx/macosx-nat-inferior.c ++++ src/gdb/macosx/macosx-nat-inferior.c +@@ -60,13 +60,17 @@ + #include <sys/sysctl.h> + #include <sys/proc.h> + #include <mach/mach_error.h> ++#if defined(TARGET_ARM) + #include <spawn.h> ++#endif + + #include <semaphore.h> + + #include <dlfcn.h> ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-dyld.h" + #include "macosx-nat-inferior.h" +--- src/gdb/macosx/macosx-nat-info.c ++++ src/gdb/macosx/macosx-nat-info.c +@@ -45,6 +45,22 @@ + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-debug.h" + ++#ifdef __ppc__ ++#ifndef __darwin_ppc_thread_state ++#define __darwin_ppc_thread_state ppc_thread_state ++#define __r0 r0 ++#define __srr0 srr0 ++#define __srr1 srr1 ++#define __cr cr ++#define __xer xer ++#define __lr lr ++#define __ctr ctr ++#endif ++#ifndef __darwin_ppc_exception_state ++#define __darwin_ppc_exception_state ppc_exception_state ++#endif ++#endif ++ + extern macosx_inferior_status *macosx_status; + + #define CHECK_ARGS(what, args) \ +--- src/gdb/macosx/macosx-nat-infthread.c ++++ src/gdb/macosx/macosx-nat-infthread.c +@@ -36,8 +36,10 @@ + #include <sys/dir.h> + #include <inttypes.h> + ++#if 0 + #include <libproc.h> + #include <sys/proc_info.h> ++#endif + + #include "macosx-nat-inferior.h" + #include "macosx-nat-inferior-util.h" +--- src/gdb/macosx/macosx-tdep.c ++++ src/gdb/macosx/macosx-tdep.c +@@ -64,7 +64,6 @@ + #include "gdbcore.h" + + #include <dirent.h> +-#include <libgen.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/param.h> +--- src/gdb/remote.c ++++ src/gdb/remote.c +@@ -63,7 +63,6 @@ + #include "macosx-nat-dyld.h" + #include "macosx-nat-dyld-process.h" + #endif +-#include <execinfo.h> + + /* Prototypes for local functions. */ + static void cleanup_sigint_signal_handler (void *dummy); +@@ -475,11 +474,13 @@ + static void + remote_backtrace_self (const char *message) + { ++#if 0 + void *bt_buffer[100]; + int count = backtrace (bt_buffer, 100); + if (message && message[0]) + fprintf_filtered (gdb_stderr, "%s", message); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); ++#endif + } + + static void +--- src/gdb/symfile.c ++++ src/gdb/symfile.c +@@ -67,7 +67,6 @@ + #include <ctype.h> + #include <time.h> + #include <sys/time.h> +-#include <libgen.h> + + #include <sys/mman.h> + +--- src/gdb/utils.c ++++ src/gdb/utils.c +@@ -28,7 +28,6 @@ + #include "event-top.h" + #include "exceptions.h" + #include "bfd.h" +-#include <execinfo.h> + #include <sys/resource.h> + #include <uuid/uuid.h> + +@@ -879,6 +878,7 @@ + target_terminal_ours (); + begin_line (); + ++#if 0 + /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely + to get useful bug reports. */ + { +@@ -887,6 +887,7 @@ + fprintf (stderr, "gdb stack crawl at point of internal error:\n"); + backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO); + } ++#endif + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch new file mode 100644 index 000000000000..633a36a7a048 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch @@ -0,0 +1,22 @@ +If dyld-info is not available, don't try to compile unreachable code +using it either. + +--- gdb-1518/src/gdb/macosx/macosx-nat-dyld.c ++++ gdb-1518/src/gdb/macosx/macosx-nat-dyld.c +@@ -779,7 +779,7 @@ + { + #if !defined (TASK_DYLD_INFO) + return 0; +-#endif ++#else + if (macosx_status->task == TASK_NULL) + return 0; + +@@ -799,6 +799,7 @@ + task_dyld_info.all_image_info_size == 0) + return 0; + s->dyld_image_infos = task_dyld_info.all_image_info_addr; ++#endif /* TASK_DYLD_INFO */ + } + #endif /* NM_NEXTSTEP */ + diff --git a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch new file mode 100644 index 000000000000..32247431fe89 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch @@ -0,0 +1,11 @@ +--- src/gdb/macosx/macosx-nat-dyld.c ++++ src/gdb/macosx/macosx-nat-dyld.c +@@ -788,7 +788,7 @@ + } + else + { +-#if defined (NM_NEXTSTEP) ++#if defined (NM_NEXTSTEP) && defined(TASK_DYLD_INFO_COUNT) + if (macosx_status->task == TASK_NULL) + return 0; + diff --git a/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch b/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch new file mode 100644 index 000000000000..bd5061d41fc0 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch @@ -0,0 +1,110 @@ +* Fabian Groffen <grobian@gentoo.org> + Mac OS X Panther (10.3) doesn't have mach_vm_size_t yet, and + apparently this was forseen in macosx-nat-inferior-debug.c. However, + macosx-nat-inferior-debug.h also uses the provided types, hence we + move the backwards-compatibility logic to the .h file. + +* Fabian Groffen <grobian@gentoo.org> + On Mac OS X Panther (10.3) an older version of the Launch Services is + available, which doesn't cover the requirements made by Xcode here. + Because it's for Xcode only, and we don't use it on Gentoo, we just + enable the functionality that doesn't compile on 10.3. + +--- gdb/macosx/macosx-nat-inferior-debug.c ++++ gdb/macosx/macosx-nat-inferior-debug.c +@@ -53,24 +53,6 @@ + + #include <AvailabilityMacros.h> + +-#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) +- +-#if MACH64 +- +-#include <mach/mach_vm.h> +- +-#else /* ! MACH64 */ +- +-#define mach_vm_size_t vm_size_t +-#define mach_vm_address_t vm_address_t +-#define mach_vm_read vm_read +-#define mach_vm_write vm_write +-#define mach_vm_region vm_region +-#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT +-#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO +- +-#endif /* MACH64 */ +- + FILE *inferior_stderr = NULL; + int inferior_debug_flag = 0; + int timestamps_debug_flag = 0; +--- gdb/macosx/macosx-nat-inferior-debug.h ++++ gdb/macosx/macosx-nat-inferior-debug.h +@@ -6,6 +6,24 @@ + + #include "defs.h" + ++#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) ++ ++#if MACH64 ++ ++#include <mach/mach_vm.h> ++ ++#else /* ! MACH64 */ ++ ++#define mach_vm_size_t vm_size_t ++#define mach_vm_address_t vm_address_t ++#define mach_vm_read vm_read ++#define mach_vm_write vm_write ++#define mach_vm_region vm_region ++#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT ++#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO ++ ++#endif /* MACH64 */ ++ + extern FILE *inferior_stderr; + extern int inferior_debug_flag; + +--- gdb/macosx/macosx-tdep.c ++++ gdb/macosx/macosx-tdep.c +@@ -413,6 +413,7 @@ + } BabelAESelInfo; + #pragma options align=reset + ++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) + static int + open_file_with_LS (const char *file_path, int lineno) + { +@@ -538,7 +539,9 @@ + + return 1; + } ++#endif + ++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) + /* Opens the file pointed to in ARGS with the default editor + given by LaunchServices. If ARGS is NULL, opens the current + source file & line. You can also supply file:line and it will +@@ -609,6 +612,7 @@ + + open_file_with_LS (filename, line_no); + } ++#endif + + void + _initialize_macosx_tdep () +@@ -618,13 +622,15 @@ + + add_info ("trampoline", info_trampoline_command, + "Resolve function for DYLD trampoline stub and/or Objective-C call"); ++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040) + c = add_com ("open", class_support, open_command, _("\ + Open the named source file in an application determined by LaunchServices.\n\ + With no arguments, open the currently selected source file.\n\ + Also takes file:line to hilight the file at the given line.")); + set_cmd_completer (c, filename_completer); + add_com_alias ("op", "open", class_support, 1); + add_com_alias ("ope", "open", class_support, 1); ++#endif + + add_com ("flushstack", class_maintenance, stack_flush_command, + "Force gdb to flush its stack-frame cache (maintainer command)"); diff --git a/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch b/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch new file mode 100644 index 000000000000..952f5b337871 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch @@ -0,0 +1,19 @@ +* Fabian Groffen <grobian@gentoo.org> + On Gentoo, when the user doesn't have a 64-bits capable CPU, we + compile GCC without multi-lib support. Hence, 64-bits defines are not + available so we better not use them if we don't have __ppc64__ + defined. + +--- gdb/macosx/macosx-nat-dyld.c ++++ gdb/macosx/macosx-nat-dyld.c +@@ -619,8 +619,10 @@ + structures. */ + if (header.cputype == CPU_TYPE_POWERPC || header.cputype == CPU_TYPE_I386) + osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN; ++#if defined(__ppc64__) + if (header.cputype == CPU_TYPE_POWERPC64 || header.cputype == GDB_CPU_TYPE_X86_64) + osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN64; ++#endif + } + + /* Once we know the address at which dyld was loaded, we can try to diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch new file mode 100644 index 000000000000..5442ba8ba636 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch @@ -0,0 +1,15 @@ +* configure checks for /usr/bin/arch to determine whether "arch" is ok + to use, so don't rely on the path at runtime, since GNU arch doesn't + understand -arch at all (and only returns the current arch name) + +--- src/gdb/fork-child.c ++++ src/gdb/fork-child.c +@@ -243,7 +243,7 @@ + arch_string = "x86_64"; + #endif + if (arch_string != NULL) +- sprintf (shell_command, "%s exec arch -arch %s ", shell_command, arch_string); ++ sprintf (shell_command, "%s exec /usr/bin/arch -arch %s ", shell_command, arch_string); + else + strcat (shell_command, "exec "); + } diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch new file mode 100644 index 000000000000..41153d8436de --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch @@ -0,0 +1,10 @@ +--- src/Makefile.in ++++ src/Makefile.in +@@ -280,6 +280,6 @@ + then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \ + else if (${CONFIGURED_MAKEINFO} --version \ +- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ ++ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \ + then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi` + + # This just becomes part of the MAKEINFO definition passed down to diff --git a/sys-devel/gdb-apple/files/gdb-apple-962-darwin64.patch b/sys-devel/gdb-apple/files/gdb-apple-962-darwin64.patch new file mode 100644 index 000000000000..4417cee76e4d --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-962-darwin64.patch @@ -0,0 +1,17 @@ +* todo: extend for powerpc64 also + +--- src/bfd/config.bfd.orig 2009-06-23 11:05:43 +0200 ++++ src/bfd/config.bfd 2009-06-23 11:05:47 +0200 +@@ -500,6 +500,12 @@ + targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" + targ_underscore=yes + ;; ++ x86_64-*-darwin*) ++ targ_defvec=mach_o_le_vec ++ targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec" ++ targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch" ++ targ_underscore=yes ++ ;; + i[3-7]86-sequent-bsd*) + targ_defvec=i386dynix_vec + targ_underscore=yes diff --git a/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch new file mode 100644 index 000000000000..05a088b93fb3 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch @@ -0,0 +1,15 @@ +* 10.4 doesn't have posix spawn, but fortunately it's only used on ARM + (iPhone), so we can still compile it + +--- src/gdb/macosx/macosx-nat-inferior.c ++++ src/gdb/macosx/macosx-nat-inferior.c +@@ -58,7 +58,9 @@ + #include <sys/sysctl.h> + #include <sys/proc.h> + #include <mach/mach_error.h> ++#ifdef TARGET_ARM + #include <spawn.h> ++#endif + + #include "macosx-nat-dyld.h" + #include "macosx-nat-inferior.h" diff --git a/sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch b/sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch new file mode 100644 index 000000000000..a302ce56ec91 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch @@ -0,0 +1,22 @@ +in 32-bits mode this goes /just/ right, in 64-bits mode Portage aborts +because objc_demangle is implicitly turned into a pointer + +--- src/gdb/maint.c.orig 2009-06-23 11:12:15 +0200 ++++ src/gdb/maint.c 2009-06-23 11:19:58 +0200 +@@ -31,6 +31,7 @@ + #include "symtab.h" + #include "gdbtypes.h" + #include "demangle.h" ++#include "objc-lang.h" + #include "gdbcore.h" + #include "expression.h" /* For language.h */ + #include "language.h" +@@ -167,7 +168,7 @@ + switch (current_language->la_language) + { + case language_objc: +- demangled = objc_demangle (args); ++ demangled = objc_demangle (args, 0); + break; + case language_objcplus: + case language_cplus: diff --git a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch new file mode 100644 index 000000000000..0c132ec5b384 --- /dev/null +++ b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch @@ -0,0 +1,23 @@ +Sourcing /etc/gdb.conf is annoying mainly because Apple put + set history save on +in there, which means everywhere you run it, you end up with a +.gdb_history file. + +--- src/gdb/main.c ++++ src/gdb/main.c +@@ -675,6 +675,7 @@ + memset (&cwdbuf, 0, sizeof (struct stat)); + /* APPLE LOCAL end move inits up */ + /* APPLE LOCAL begin global gdbinit */ ++#ifdef WANT_GLOBAL_GDBINIT + memset (&globalbuf, 0, sizeof (struct stat)); + stat (gdbinit_global, &globalbuf); + if (!inhibit_gdbinit) +@@ -683,6 +684,7 @@ + source_file (gdbinit_global, 0); + } + do_cleanups (ALL_CLEANUPS); ++#endif + /* APPLE LOCAL end global gdbinit */ + + /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing |