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

Side by Side Diff: base/third_party/symbolize/symbolize.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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 | « base/third_party/symbolize/symbolize.h ('k') | base/third_party/symbolize/utilities.h » ('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) 2006, Google Inc. 1 // Copyright (c) 2006, 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 } 766 }
767 FileDescriptor wrapped_object_fd(object_fd); 767 FileDescriptor wrapped_object_fd(object_fd);
768 int elf_type = FileGetElfType(wrapped_object_fd.get()); 768 int elf_type = FileGetElfType(wrapped_object_fd.get());
769 if (elf_type == -1) { 769 if (elf_type == -1) {
770 return false; 770 return false;
771 } 771 }
772 if (g_symbolize_callback) { 772 if (g_symbolize_callback) {
773 // Run the call back if it's installed. 773 // Run the call back if it's installed.
774 // Note: relocation (and much of the rest of this code) will be 774 // Note: relocation (and much of the rest of this code) will be
775 // wrong for prelinked shared libraries and PIE executables. 775 // wrong for prelinked shared libraries and PIE executables.
776 uint64 relocation = (elf_type == ET_DYN) ? start_address : 0; 776 uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0;
777 int num_bytes_written = g_symbolize_callback(wrapped_object_fd.get(), 777 int num_bytes_written = g_symbolize_callback(wrapped_object_fd.get(),
778 pc, out, out_size, 778 pc, out, out_size,
779 relocation); 779 relocation);
780 if (num_bytes_written > 0) { 780 if (num_bytes_written > 0) {
781 out += num_bytes_written; 781 out += num_bytes_written;
782 out_size -= num_bytes_written; 782 out_size -= num_bytes_written;
783 } 783 }
784 } 784 }
785 if (!GetSymbolFromObjectFile(wrapped_object_fd.get(), pc0, 785 if (!GetSymbolFromObjectFile(wrapped_object_fd.get(), pc0,
786 out, out_size, start_address)) { 786 out, out_size, start_address)) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 840
841 // TODO: Support other environments. 841 // TODO: Support other environments.
842 bool Symbolize(void *pc, char *out, int out_size) { 842 bool Symbolize(void *pc, char *out, int out_size) {
843 assert(0); 843 assert(0);
844 return false; 844 return false;
845 } 845 }
846 846
847 _END_GOOGLE_NAMESPACE_ 847 _END_GOOGLE_NAMESPACE_
848 848
849 #endif 849 #endif
OLDNEW
« no previous file with comments | « base/third_party/symbolize/symbolize.h ('k') | base/third_party/symbolize/utilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698