aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/dynamic_images.h
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-10-22 05:08:50 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-10-22 05:08:50 +0000
commit32441cc0608ddaf81885d23acf63f4b53cb73744 (patch)
tree531187cc989b4008635f5f398679742e7ee94e64 /src/client/mac/handler/dynamic_images.h
parentIssue 276 - generate GUIDs ahead of time in Linux handler. r=Liu Li (diff)
downloadbreakpad-32441cc0608ddaf81885d23acf63f4b53cb73744.tar.xz
Issue 181: Add version info for Mac OS X modules. Found by iterating over load commands until I found LC_ID_DYLIB. Also modified crash_report to generate version number. Also added suspend/resume capability to exception handler, necessary because exception handling can behave strangely across fork() calls. Also added fix for filtering out functions with no line number information, and for filtering out some multiple inheritance glue the compiler generates.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@291 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/dynamic_images.h')
-rw-r--r--src/client/mac/handler/dynamic_images.h29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h
index c9acf70a..85ba8cf9 100644
--- a/src/client/mac/handler/dynamic_images.h
+++ b/src/client/mac/handler/dynamic_images.h
@@ -114,7 +114,7 @@ class DynamicImage {
file_mod_date_(image_mod_date),
task_(task) {
InitializeFilePath(inFilePath);
- CalculateMemoryInfo();
+ CalculateMemoryAndVersionInfo();
}
~DynamicImage() {
@@ -150,6 +150,7 @@ class DynamicImage {
// Task owning this loaded image
mach_port_t GetTask() {return task_;}
+ uint32_t GetVersion() {return version_;}
// For sorting
bool operator<(const DynamicImage &inInfo) {
return GetLoadAddress() < inInfo.GetLoadAddress();
@@ -176,29 +177,7 @@ class DynamicImage {
}
// Initializes vmaddr_, vmsize_, and slide_
- void CalculateMemoryInfo();
-
-#if 0 // currently not needed
- // Copy constructor: we don't want this to be invoked,
- // but here's the code in case we need to make it public some day.
- DynamicImage(DynamicImage &inInfo)
- : load_address_(inInfo.load_address_),
- vmaddr_(inInfo.vmaddr_),
- vmsize_(inInfo.vmsize_),
- slide_(inInfo.slide_),
- file_mod_date_(inInfo.file_mod_date_),
- task_(inInfo.task_) {
- // copy file path string
- InitializeFilePath(inInfo.GetFilePath());
-
- // copy mach_header and load commands
- void *headerBuffer = malloc(inInfo.header_size_);
- header_ = reinterpret_cast<breakpad_mach_header*>(headerBuffer);
-
- memcpy(header_, inInfo.header_, inInfo.header_size_);
- header_size_ = inInfo.header_size_;
- }
-#endif
+ void CalculateMemoryAndVersionInfo();
breakpad_mach_header *header_; // our local copy of the header
int header_size_; // mach_header plus load commands
@@ -206,7 +185,7 @@ class DynamicImage {
mach_vm_address_t vmaddr_;
mach_vm_size_t vmsize_;
ptrdiff_t slide_;
-
+ uint32_t version_; // Dylib version
char *file_path_; // path dyld used to load the image
uintptr_t file_mod_date_; // time_t of image file