Loading...
--- dyld/dyld-97.1/src/dyld_gdb.cpp
+++ dyld/dyld-43/src/dyld_gdb.cpp
@@ -31,11 +31,9 @@
#include <vector>
#include "mach-o/dyld_gdb.h"
-#include "mach-o/dyld_images.h"
-
-#define OLD_GDB_DYLD_INTERFACE __ppc__ || __i386__
-
-// old gdb interface to dyld only supported on 32-bit ppc and i386
+
+
+// old gdb interface to dyld only supported on 32-bit ppc and i386 (not ppc64_
#if OLD_GDB_DYLD_INTERFACE
unsigned int gdb_dyld_version = 2;
@@ -82,8 +80,8 @@
unsigned int gdb_library_image_size = sizeof(image);
extern "C" {
-object_images object_images;// = { {}, 0 , NULL };
-library_images library_images;// = { {}, 0 , NULL };
+object_images object_images = { {}, 0 , NULL };
+library_images library_images = { {}, 0 , NULL };
void send_event(const struct dyld_event* event);
}
@@ -172,10 +170,6 @@
void addImagesToAllImages(uint32_t infoCount, const dyld_image_info info[])
{
- // make initial size large enought that we probably won't need to re-alloc it
- if ( sImageInfos.size() == 0 )
- sImageInfos.reserve(200);
-
// set infoArray to NULL to denote it is in-use
dyld_all_image_infos.infoArray = NULL;
@@ -220,17 +214,14 @@
{
// do nothing
// gdb sets a break point here to catch notifications
- //dyld::log("dyld: gdb_image_notifier(%s, %d, ...)\n", mode ? "dyld_image_removing" : "dyld_image_adding", infoCount);
- //for (uint32_t i=0; i < infoCount; ++i)
- // dyld::log("dyld: %d loading at %p %s\n", i, info[i].imageLoadAddress, info[i].imageFilePath);
+ //fprintf(stderr, "dyld: gdb_image_notifier(%s, %d, ...)\n", mode ? "dyld_image_removing" : "dyld_image_adding", infoCount);
//for (uint32_t i=0; i < dyld_all_image_infos.infoArrayCount; ++i)
- // dyld::log("dyld: %d loading at %p %s\n", i, dyld_all_image_infos.infoArray[i].imageLoadAddress, dyld_all_image_infos.infoArray[i].imageFilePath);
+ // fprintf(stderr, "dyld: %d loading at %p %s\n", i, dyld_all_image_infos.infoArray[i].imageLoadAddress, dyld_all_image_infos.infoArray[i].imageFilePath);
}
struct dyld_all_image_infos dyld_all_image_infos = { 1, 0, NULL, &gdb_image_notifier, false };
-struct dyld_shared_cache_ranges dyld_shared_cache_ranges;