aboutsummaryrefslogtreecommitdiff
path: root/src/common/module.h
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-05 17:35:10 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-05 17:35:10 +0000
commit25b512d64dc9ec959d646151cf0cdc403ea0c335 (patch)
treef17ee11f3b5aa09c65accf8b9903b7c7c894363a /src/common/module.h
parentBreakpad Linux dumper: Handle STABS-in-symbol-table, and line number records ... (diff)
downloadbreakpad-25b512d64dc9ec959d646151cf0cdc403ea0c335.tar.xz
Breakpad symbol dumper: Promise that Module::SetLoadAddress can be called at any time.
It's possible to imagine an implementation of google_breakpad::Module in which calling SetLoadAddress at different times as the Module is populated would produce different output. For the Mac dumper, we'd like to depend on its current behavior --- that the load address is subtracted off only when writing the symbol file, and can be set at any time prior to that. This patch makes that promise part of Module's contract, and adjusts the test suite to verify that that promise is met. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@588 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/module.h')
-rw-r--r--src/common/module.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/module.h b/src/common/module.h
index 7a44d4ab..92012249 100644
--- a/src/common/module.h
+++ b/src/common/module.h
@@ -153,8 +153,14 @@ class Module {
// for functions and lines will be written to the Breakpad symbol
// file as offsets from this address. Construction initializes this
// module's load address to zero: addresses written to the symbol
- // file will be the same as they appear in the File and Line
- // structures.
+ // file will be the same as they appear in the Function, Line, and
+ // StackFrameEntry structures.
+ //
+ // Note that this member function has no effect on addresses stored
+ // in the data added to this module; the Write member function
+ // simply subtracts off the load address from addresses before it
+ // prints them. Only the last load address given before calling
+ // Write is used.
void SetLoadAddress(Address load_address);
// Add FUNCTION to the module.
@@ -223,7 +229,7 @@ class Module {
// established by SetLoadAddress.
bool Write(FILE *stream);
-private:
+ private:
// Report an error that has occurred writing the symbol file, using
// errno to find the appropriate cause. Return false.