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

Side by Side Diff: src/common/dwarf/dwarf2diehandler.cc

Issue 1605153004: unittests: fix -Wnarrowing build errors (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: back to stdint.h Created 4 years, 11 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
« no previous file with comments | « src/common/dwarf/dwarf2diehandler.h ('k') | src/common/dwarf/dwarf2diehandler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 Google Inc. All Rights Reserved. 1 // Copyright (c) 2010 Google Inc. All Rights Reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 14 matching lines...) Expand all
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 // Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com> 29 // Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
30 30
31 // dwarf2diehandler.cc: Implement the dwarf2reader::DieDispatcher class. 31 // dwarf2diehandler.cc: Implement the dwarf2reader::DieDispatcher class.
32 // See dwarf2diehandler.h for details. 32 // See dwarf2diehandler.h for details.
33 33
34 #include <assert.h> 34 #include <assert.h>
35 #include <stdint.h>
35 36
36 #include <string> 37 #include <string>
37 38
38 #include "common/dwarf/dwarf2diehandler.h" 39 #include "common/dwarf/dwarf2diehandler.h"
39 #include "common/using_std_string.h" 40 #include "common/using_std_string.h"
40 41
41 namespace dwarf2reader { 42 namespace dwarf2reader {
42 43
43 DIEDispatcher::~DIEDispatcher() { 44 DIEDispatcher::~DIEDispatcher() {
44 while (!die_handlers_.empty()) { 45 while (!die_handlers_.empty()) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 uint64 data) { 161 uint64 data) {
161 HandlerStack &current = die_handlers_.top(); 162 HandlerStack &current = die_handlers_.top();
162 // This had better be an attribute of the DIE we were meant to handle. 163 // This had better be an attribute of the DIE we were meant to handle.
163 assert(offset == current.offset_); 164 assert(offset == current.offset_);
164 current.handler_->ProcessAttributeReference(attr, form, data); 165 current.handler_->ProcessAttributeReference(attr, form, data);
165 } 166 }
166 167
167 void DIEDispatcher::ProcessAttributeBuffer(uint64 offset, 168 void DIEDispatcher::ProcessAttributeBuffer(uint64 offset,
168 enum DwarfAttribute attr, 169 enum DwarfAttribute attr,
169 enum DwarfForm form, 170 enum DwarfForm form,
170 const char* data, 171 const uint8_t *data,
171 uint64 len) { 172 uint64 len) {
172 HandlerStack &current = die_handlers_.top(); 173 HandlerStack &current = die_handlers_.top();
173 // This had better be an attribute of the DIE we were meant to handle. 174 // This had better be an attribute of the DIE we were meant to handle.
174 assert(offset == current.offset_); 175 assert(offset == current.offset_);
175 current.handler_->ProcessAttributeBuffer(attr, form, data, len); 176 current.handler_->ProcessAttributeBuffer(attr, form, data, len);
176 } 177 }
177 178
178 void DIEDispatcher::ProcessAttributeString(uint64 offset, 179 void DIEDispatcher::ProcessAttributeString(uint64 offset,
179 enum DwarfAttribute attr, 180 enum DwarfAttribute attr,
180 enum DwarfForm form, 181 enum DwarfForm form,
181 const string& data) { 182 const string& data) {
182 HandlerStack &current = die_handlers_.top(); 183 HandlerStack &current = die_handlers_.top();
183 // This had better be an attribute of the DIE we were meant to handle. 184 // This had better be an attribute of the DIE we were meant to handle.
184 assert(offset == current.offset_); 185 assert(offset == current.offset_);
185 current.handler_->ProcessAttributeString(attr, form, data); 186 current.handler_->ProcessAttributeString(attr, form, data);
186 } 187 }
187 188
188 void DIEDispatcher::ProcessAttributeSignature(uint64 offset, 189 void DIEDispatcher::ProcessAttributeSignature(uint64 offset,
189 enum DwarfAttribute attr, 190 enum DwarfAttribute attr,
190 enum DwarfForm form, 191 enum DwarfForm form,
191 uint64 signature) { 192 uint64 signature) {
192 HandlerStack &current = die_handlers_.top(); 193 HandlerStack &current = die_handlers_.top();
193 // This had better be an attribute of the DIE we were meant to handle. 194 // This had better be an attribute of the DIE we were meant to handle.
194 assert(offset == current.offset_); 195 assert(offset == current.offset_);
195 current.handler_->ProcessAttributeSignature(attr, form, signature); 196 current.handler_->ProcessAttributeSignature(attr, form, signature);
196 } 197 }
197 198
198 } // namespace dwarf2reader 199 } // namespace dwarf2reader
OLDNEW
« no previous file with comments | « src/common/dwarf/dwarf2diehandler.h ('k') | src/common/dwarf/dwarf2diehandler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698