OLD | NEW |
1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 static const unsigned kNumDebugRegisters = 8; | 58 static const unsigned kNumDebugRegisters = 8; |
59 debugreg_t dregs[8]; | 59 debugreg_t dregs[8]; |
60 #endif | 60 #endif |
61 }; | 61 }; |
62 | 62 |
63 // One of these is produced for each mapping in the process (i.e. line in | 63 // One of these is produced for each mapping in the process (i.e. line in |
64 // /proc/$x/maps). | 64 // /proc/$x/maps). |
65 struct MappingInfo { | 65 struct MappingInfo { |
66 uintptr_t start_addr; | 66 uintptr_t start_addr; |
67 size_t size; | 67 size_t size; |
| 68 size_t offset; // offset into the backed file. |
68 char name[NAME_MAX]; | 69 char name[NAME_MAX]; |
69 }; | 70 }; |
70 | 71 |
71 class LinuxDumper { | 72 class LinuxDumper { |
72 public: | 73 public: |
73 explicit LinuxDumper(pid_t pid); | 74 explicit LinuxDumper(pid_t pid); |
74 | 75 |
75 // Parse the data for |threads| and |mappings|. | 76 // Parse the data for |threads| and |mappings|. |
76 bool Init(); | 77 bool Init(); |
77 | 78 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 mutable PageAllocator allocator_; | 110 mutable PageAllocator allocator_; |
110 | 111 |
111 bool threads_suspened_; | 112 bool threads_suspened_; |
112 wasteful_vector<pid_t> threads_; // the ids of all the threads | 113 wasteful_vector<pid_t> threads_; // the ids of all the threads |
113 wasteful_vector<MappingInfo*> mappings_; // info from /proc/<pid>/maps | 114 wasteful_vector<MappingInfo*> mappings_; // info from /proc/<pid>/maps |
114 }; | 115 }; |
115 | 116 |
116 } // namespace google_breakpad | 117 } // namespace google_breakpad |
117 | 118 |
118 #endif // CLIENT_LINUX_HANDLER_LINUX_DUMPER_H_ | 119 #endif // CLIENT_LINUX_HANDLER_LINUX_DUMPER_H_ |
OLD | NEW |