| OLD | NEW |
| 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 2654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2665 | 2665 |
| 2666 | 2666 |
| 2667 const MinidumpModule* MinidumpModuleList::GetModuleForAddress( | 2667 const MinidumpModule* MinidumpModuleList::GetModuleForAddress( |
| 2668 uint64_t address) const { | 2668 uint64_t address) const { |
| 2669 if (!valid_) { | 2669 if (!valid_) { |
| 2670 BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleForAddress"; | 2670 BPLOG(ERROR) << "Invalid MinidumpModuleList for GetModuleForAddress"; |
| 2671 return NULL; | 2671 return NULL; |
| 2672 } | 2672 } |
| 2673 | 2673 |
| 2674 unsigned int module_index; | 2674 unsigned int module_index; |
| 2675 if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) { | 2675 if (!range_map_->RetrieveRange(address, &module_index, NULL /* base */, |
| 2676 NULL /* delta */, NULL /* size */)) { |
| 2676 BPLOG(INFO) << "MinidumpModuleList has no module at " << | 2677 BPLOG(INFO) << "MinidumpModuleList has no module at " << |
| 2677 HexString(address); | 2678 HexString(address); |
| 2678 return NULL; | 2679 return NULL; |
| 2679 } | 2680 } |
| 2680 | 2681 |
| 2681 return GetModuleAtIndex(module_index); | 2682 return GetModuleAtIndex(module_index); |
| 2682 } | 2683 } |
| 2683 | 2684 |
| 2684 | 2685 |
| 2685 const MinidumpModule* MinidumpModuleList::GetMainModule() const { | 2686 const MinidumpModule* MinidumpModuleList::GetMainModule() const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2701 return NULL; | 2702 return NULL; |
| 2702 } | 2703 } |
| 2703 | 2704 |
| 2704 if (sequence >= module_count_) { | 2705 if (sequence >= module_count_) { |
| 2705 BPLOG(ERROR) << "MinidumpModuleList sequence out of range: " << | 2706 BPLOG(ERROR) << "MinidumpModuleList sequence out of range: " << |
| 2706 sequence << "/" << module_count_; | 2707 sequence << "/" << module_count_; |
| 2707 return NULL; | 2708 return NULL; |
| 2708 } | 2709 } |
| 2709 | 2710 |
| 2710 unsigned int module_index; | 2711 unsigned int module_index; |
| 2711 if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) { | 2712 if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, |
| 2713 NULL /* base */, NULL /* delta */, |
| 2714 NULL /* size */)) { |
| 2712 BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence; | 2715 BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence; |
| 2713 return NULL; | 2716 return NULL; |
| 2714 } | 2717 } |
| 2715 | 2718 |
| 2716 return GetModuleAtIndex(module_index); | 2719 return GetModuleAtIndex(module_index); |
| 2717 } | 2720 } |
| 2718 | 2721 |
| 2719 | 2722 |
| 2720 const MinidumpModule* MinidumpModuleList::GetModuleAtIndex( | 2723 const MinidumpModule* MinidumpModuleList::GetModuleAtIndex( |
| 2721 unsigned int index) const { | 2724 unsigned int index) const { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2916 | 2919 |
| 2917 | 2920 |
| 2918 MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress( | 2921 MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress( |
| 2919 uint64_t address) { | 2922 uint64_t address) { |
| 2920 if (!valid_) { | 2923 if (!valid_) { |
| 2921 BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionForAddress"; | 2924 BPLOG(ERROR) << "Invalid MinidumpMemoryList for GetMemoryRegionForAddress"; |
| 2922 return NULL; | 2925 return NULL; |
| 2923 } | 2926 } |
| 2924 | 2927 |
| 2925 unsigned int region_index; | 2928 unsigned int region_index; |
| 2926 if (!range_map_->RetrieveRange(address, ®ion_index, NULL, NULL)) { | 2929 if (!range_map_->RetrieveRange(address, ®ion_index, NULL /* base */, |
| 2930 NULL /* delta */, NULL /* size */)) { |
| 2927 BPLOG(INFO) << "MinidumpMemoryList has no memory region at " << | 2931 BPLOG(INFO) << "MinidumpMemoryList has no memory region at " << |
| 2928 HexString(address); | 2932 HexString(address); |
| 2929 return NULL; | 2933 return NULL; |
| 2930 } | 2934 } |
| 2931 | 2935 |
| 2932 return GetMemoryRegionAtIndex(region_index); | 2936 return GetMemoryRegionAtIndex(region_index); |
| 2933 } | 2937 } |
| 2934 | 2938 |
| 2935 | 2939 |
| 2936 void MinidumpMemoryList::Print() { | 2940 void MinidumpMemoryList::Print() { |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4020 | 4024 |
| 4021 const MinidumpMemoryInfo* MinidumpMemoryInfoList::GetMemoryInfoForAddress( | 4025 const MinidumpMemoryInfo* MinidumpMemoryInfoList::GetMemoryInfoForAddress( |
| 4022 uint64_t address) const { | 4026 uint64_t address) const { |
| 4023 if (!valid_) { | 4027 if (!valid_) { |
| 4024 BPLOG(ERROR) << "Invalid MinidumpMemoryInfoList for" | 4028 BPLOG(ERROR) << "Invalid MinidumpMemoryInfoList for" |
| 4025 " GetMemoryInfoForAddress"; | 4029 " GetMemoryInfoForAddress"; |
| 4026 return NULL; | 4030 return NULL; |
| 4027 } | 4031 } |
| 4028 | 4032 |
| 4029 unsigned int info_index; | 4033 unsigned int info_index; |
| 4030 if (!range_map_->RetrieveRange(address, &info_index, NULL, NULL)) { | 4034 if (!range_map_->RetrieveRange(address, &info_index, NULL /* base */, |
| 4035 NULL /* delta */, NULL /* size */)) { |
| 4031 BPLOG(INFO) << "MinidumpMemoryInfoList has no memory info at " << | 4036 BPLOG(INFO) << "MinidumpMemoryInfoList has no memory info at " << |
| 4032 HexString(address); | 4037 HexString(address); |
| 4033 return NULL; | 4038 return NULL; |
| 4034 } | 4039 } |
| 4035 | 4040 |
| 4036 return GetMemoryInfoAtIndex(info_index); | 4041 return GetMemoryInfoAtIndex(info_index); |
| 4037 } | 4042 } |
| 4038 | 4043 |
| 4039 | 4044 |
| 4040 void MinidumpMemoryInfoList::Print() { | 4045 void MinidumpMemoryInfoList::Print() { |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4865 return NULL; | 4870 return NULL; |
| 4866 } | 4871 } |
| 4867 | 4872 |
| 4868 *stream = new_stream.release(); | 4873 *stream = new_stream.release(); |
| 4869 info->stream = *stream; | 4874 info->stream = *stream; |
| 4870 return *stream; | 4875 return *stream; |
| 4871 } | 4876 } |
| 4872 | 4877 |
| 4873 | 4878 |
| 4874 } // namespace google_breakpad | 4879 } // namespace google_breakpad |
| OLD | NEW |