OLD | NEW |
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 if (abbrev.has_children) { | 510 if (abbrev.has_children) { |
511 die_stack.push(absolute_offset); | 511 die_stack.push(absolute_offset); |
512 } else { | 512 } else { |
513 handler_->EndDIE(absolute_offset); | 513 handler_->EndDIE(absolute_offset); |
514 } | 514 } |
515 } | 515 } |
516 } | 516 } |
517 | 517 |
518 LineInfo::LineInfo(const char* buffer, uint64 buffer_length, | 518 LineInfo::LineInfo(const char* buffer, uint64 buffer_length, |
519 ByteReader* reader, LineInfoHandler* handler): | 519 ByteReader* reader, LineInfoHandler* handler): |
520 handler_(handler), reader_(reader), buffer_(buffer), | 520 handler_(handler), reader_(reader), buffer_(buffer) { |
521 buffer_length_(buffer_length) { | 521 #ifndef NDEBUG |
| 522 buffer_length_ = buffer_length; |
| 523 #endif |
522 header_.std_opcode_lengths = NULL; | 524 header_.std_opcode_lengths = NULL; |
523 } | 525 } |
524 | 526 |
525 uint64 LineInfo::Start() { | 527 uint64 LineInfo::Start() { |
526 ReadHeader(); | 528 ReadHeader(); |
527 ReadLines(); | 529 ReadLines(); |
528 return after_header_ - buffer_; | 530 return after_header_ - buffer_; |
529 } | 531 } |
530 | 532 |
531 // The header for a debug_line section is mildly complicated, because | 533 // The header for a debug_line section is mildly complicated, because |
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2335 uint64 insn_offset) { | 2337 uint64 insn_offset) { |
2336 fprintf(stderr, | 2338 fprintf(stderr, |
2337 "%s: CFI %s at offset 0x%llx in section '%s':" | 2339 "%s: CFI %s at offset 0x%llx in section '%s':" |
2338 " the DW_CFA_restore_state instruction at offset 0x%llx" | 2340 " the DW_CFA_restore_state instruction at offset 0x%llx" |
2339 " would clear the CFA rule in effect\n", | 2341 " would clear the CFA rule in effect\n", |
2340 filename_.c_str(), CallFrameInfo::KindName(kind), offset, | 2342 filename_.c_str(), CallFrameInfo::KindName(kind), offset, |
2341 section_.c_str(), insn_offset); | 2343 section_.c_str(), insn_offset); |
2342 } | 2344 } |
2343 | 2345 |
2344 } // namespace dwarf2reader | 2346 } // namespace dwarf2reader |
OLD | NEW |