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 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1923 } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { | 1923 } else if (cv_record_signature_ == MD_CVINFOPDB20_SIGNATURE) { |
1924 // It's actually an MDCVInfoPDB20 structure. | 1924 // It's actually an MDCVInfoPDB20 structure. |
1925 const MDCVInfoPDB20* cv_record_20 = | 1925 const MDCVInfoPDB20* cv_record_20 = |
1926 reinterpret_cast<const MDCVInfoPDB20*>(&(*cv_record_)[0]); | 1926 reinterpret_cast<const MDCVInfoPDB20*>(&(*cv_record_)[0]); |
1927 assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); | 1927 assert(cv_record_20->cv_header.signature == MD_CVINFOPDB20_SIGNATURE); |
1928 | 1928 |
1929 // GetCVRecord guarantees pdb_file_name is null-terminated. | 1929 // GetCVRecord guarantees pdb_file_name is null-terminated. |
1930 file = reinterpret_cast<const char*>(cv_record_20->pdb_file_name); | 1930 file = reinterpret_cast<const char*>(cv_record_20->pdb_file_name); |
1931 } else if (cv_record_signature_ == MD_CVINFOELF_SIGNATURE) { | 1931 } else if (cv_record_signature_ == MD_CVINFOELF_SIGNATURE) { |
1932 // It's actually an MDCVInfoELF structure. | 1932 // It's actually an MDCVInfoELF structure. |
1933 const MDCVInfoELF* cv_record_elf = | 1933 assert(reinterpret_cast<const MDCVInfoELF*>(&(*cv_record_)[0]) |
1934 reinterpret_cast<const MDCVInfoELF*>(&(*cv_record_)[0]); | 1934 ->cv_signature == MD_CVINFOELF_SIGNATURE); |
1935 assert(cv_record_elf->cv_signature == MD_CVINFOELF_SIGNATURE); | |
1936 | 1935 |
1937 // For MDCVInfoELF, the debug file is the code file. | 1936 // For MDCVInfoELF, the debug file is the code file. |
1938 file = *name_; | 1937 file = *name_; |
1939 } | 1938 } |
1940 | 1939 |
1941 // If there's a CodeView record but it doesn't match a known signature, | 1940 // If there's a CodeView record but it doesn't match a known signature, |
1942 // try the miscellaneous record. | 1941 // try the miscellaneous record. |
1943 } | 1942 } |
1944 | 1943 |
1945 if (file.empty()) { | 1944 if (file.empty()) { |
(...skipping 2912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4858 return NULL; | 4857 return NULL; |
4859 } | 4858 } |
4860 | 4859 |
4861 *stream = new_stream.release(); | 4860 *stream = new_stream.release(); |
4862 info->stream = *stream; | 4861 info->stream = *stream; |
4863 return *stream; | 4862 return *stream; |
4864 } | 4863 } |
4865 | 4864 |
4866 | 4865 |
4867 } // namespace google_breakpad | 4866 } // namespace google_breakpad |
OLD | NEW |