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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // Symtab section name. | 149 // Symtab section name. |
150 const char *kSymtabName = ".symtab"; | 150 const char *kSymtabName = ".symtab"; |
151 | 151 |
152 // Strtab section name. | 152 // Strtab section name. |
153 const char *kStrtabName = ".strtab"; | 153 const char *kStrtabName = ".strtab"; |
154 | 154 |
155 // Default buffer lenght for demangle. | 155 // Default buffer lenght for demangle. |
156 const int demangleLen = 20000; | 156 const int demangleLen = 20000; |
157 | 157 |
158 // Offset to the string table. | 158 // Offset to the string table. |
159 u_int64_t stringOffset = 0; | 159 uint64_t stringOffset = 0; |
160 | 160 |
161 // Update the offset to the start of the string index of the next | 161 // Update the offset to the start of the string index of the next |
162 // object module for every N_ENDM stabs. | 162 // object module for every N_ENDM stabs. |
163 inline void RecalculateOffset(struct slist* cur_list, char *stabstr) { | 163 inline void RecalculateOffset(struct slist* cur_list, char *stabstr) { |
164 while ((--cur_list)->n_strx == 0) ; | 164 while ((--cur_list)->n_strx == 0) ; |
165 stringOffset += cur_list->n_strx; | 165 stringOffset += cur_list->n_strx; |
166 | 166 |
167 char *temp = stabstr + stringOffset; | 167 char *temp = stabstr + stringOffset; |
168 while (*temp != '\0') { | 168 while (*temp != '\0') { |
169 ++stringOffset; | 169 ++stringOffset; |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 return false; | 672 return false; |
673 // Write to symbol file. | 673 // Write to symbol file. |
674 if (WriteModuleInfo(sym_fd, elf_header.e_machine, obj_file) && | 674 if (WriteModuleInfo(sym_fd, elf_header.e_machine, obj_file) && |
675 DumpStabSymbols(sym_fd, symbols)) | 675 DumpStabSymbols(sym_fd, symbols)) |
676 return true; | 676 return true; |
677 | 677 |
678 return false; | 678 return false; |
679 } | 679 } |
680 | 680 |
681 } // namespace google_breakpad | 681 } // namespace google_breakpad |
OLD | NEW |