Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: src/google_breakpad/processor/minidump.h

Issue 2060663002: Server-side workaround to handle overlapping modules. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Fixing whitespace Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 Google Inc. 1 // Copyright (c) 2010 Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // CodeModule implementation 385 // CodeModule implementation
386 virtual uint64_t base_address() const { 386 virtual uint64_t base_address() const {
387 return valid_ ? module_.base_of_image : static_cast<uint64_t>(-1); 387 return valid_ ? module_.base_of_image : static_cast<uint64_t>(-1);
388 } 388 }
389 virtual uint64_t size() const { return valid_ ? module_.size_of_image : 0; } 389 virtual uint64_t size() const { return valid_ ? module_.size_of_image : 0; }
390 virtual string code_file() const; 390 virtual string code_file() const;
391 virtual string code_identifier() const; 391 virtual string code_identifier() const;
392 virtual string debug_file() const; 392 virtual string debug_file() const;
393 virtual string debug_identifier() const; 393 virtual string debug_identifier() const;
394 virtual string version() const; 394 virtual string version() const;
395 virtual const CodeModule* Copy() const; 395 virtual CodeModule* Copy() const;
396
397 // Getter and setter for shrink_down_delta. This is used when the address
398 // range for a module is shrunk down due to address range conflicts with
399 // other modules. The base_address and size fields are not updated and they
400 // should always reflect the original values (reported in the minidump).
401 virtual uint64_t shrink_down_delta() const;
402 virtual void SetShrinkDownDelta(uint64_t shrink_down_delta);
396 403
397 // The CodeView record, which contains information to locate the module's 404 // The CodeView record, which contains information to locate the module's
398 // debugging information (pdb). This is returned as uint8_t* because 405 // debugging information (pdb). This is returned as uint8_t* because
399 // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be 406 // the data can be of types MDCVInfoPDB20* or MDCVInfoPDB70*, or it may be
400 // of a type unknown to Breakpad, in which case the raw data will still be 407 // of a type unknown to Breakpad, in which case the raw data will still be
401 // returned but no byte-swapping will have been performed. Check the 408 // returned but no byte-swapping will have been performed. Check the
402 // record's signature in the first four bytes to differentiate between 409 // record's signature in the first four bytes to differentiate between
403 // the various types. Current toolchains generate modules which carry 410 // the various types. Current toolchains generate modules which carry
404 // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on 411 // MDCVInfoPDB70 by default. Returns a pointer to the CodeView record on
405 // success, and NULL on failure. On success, the optional |size| argument 412 // success, and NULL on failure. On success, the optional |size| argument
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 virtual unsigned int module_count() const { 501 virtual unsigned int module_count() const {
495 return valid_ ? module_count_ : 0; 502 return valid_ ? module_count_ : 0;
496 } 503 }
497 virtual const MinidumpModule* GetModuleForAddress(uint64_t address) const; 504 virtual const MinidumpModule* GetModuleForAddress(uint64_t address) const;
498 virtual const MinidumpModule* GetMainModule() const; 505 virtual const MinidumpModule* GetMainModule() const;
499 virtual const MinidumpModule* GetModuleAtSequence( 506 virtual const MinidumpModule* GetModuleAtSequence(
500 unsigned int sequence) const; 507 unsigned int sequence) const;
501 virtual const MinidumpModule* GetModuleAtIndex(unsigned int index) const; 508 virtual const MinidumpModule* GetModuleAtIndex(unsigned int index) const;
502 virtual const CodeModules* Copy() const; 509 virtual const CodeModules* Copy() const;
503 510
511 // Returns a vector of all modules which address ranges needed to be shrunk
512 // down due to address range conflicts with other modules.
513 virtual vector<linked_ptr<const CodeModule> > GetShrunkRangeModules() const;
514
504 // Print a human-readable representation of the object to stdout. 515 // Print a human-readable representation of the object to stdout.
505 void Print(); 516 void Print();
506 517
507 protected: 518 protected:
508 explicit MinidumpModuleList(Minidump* minidump); 519 explicit MinidumpModuleList(Minidump* minidump);
509 520
510 private: 521 private:
511 friend class Minidump; 522 friend class Minidump;
512 523
513 typedef vector<MinidumpModule> MinidumpModules; 524 typedef vector<MinidumpModule> MinidumpModules;
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 // construction or after a failed Read(); true following a successful 1132 // construction or after a failed Read(); true following a successful
1122 // Read(). 1133 // Read().
1123 bool valid_; 1134 bool valid_;
1124 }; 1135 };
1125 1136
1126 1137
1127 } // namespace google_breakpad 1138 } // namespace google_breakpad
1128 1139
1129 1140
1130 #endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ 1141 #endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698