OLD | NEW |
1 // Copyright (c) 2014, Google Inc. | 1 // Copyright (c) 2014, 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 22 matching lines...) Expand all Loading... |
33 #include <sys/ucontext.h> | 33 #include <sys/ucontext.h> |
34 #include <sys/user.h> | 34 #include <sys/user.h> |
35 | 35 |
36 #include "client/linux/dump_writer_common/raw_context_cpu.h" | 36 #include "client/linux/dump_writer_common/raw_context_cpu.h" |
37 #include "common/memory.h" | 37 #include "common/memory.h" |
38 #include "google_breakpad/common/minidump_format.h" | 38 #include "google_breakpad/common/minidump_format.h" |
39 | 39 |
40 namespace google_breakpad { | 40 namespace google_breakpad { |
41 | 41 |
42 #if defined(__i386) || defined(__x86_64) | 42 #if defined(__i386) || defined(__x86_64) |
43 typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t; | 43 typedef __typeof__(((struct user*) 0)->u_debugreg[0]) debugreg_t; |
44 #endif | 44 #endif |
45 | 45 |
46 // We produce one of these structures for each thread in the crashed process. | 46 // We produce one of these structures for each thread in the crashed process. |
47 struct ThreadInfo { | 47 struct ThreadInfo { |
48 pid_t tgid; // thread group id | 48 pid_t tgid; // thread group id |
49 pid_t ppid; // parent process | 49 pid_t ppid; // parent process |
50 | 50 |
51 uintptr_t stack_pointer; // thread stack pointer | 51 uintptr_t stack_pointer; // thread stack pointer |
52 | 52 |
53 | 53 |
(...skipping 25 matching lines...) Expand all Loading... |
79 // Returns the instruction pointer (platform-dependent impl.). | 79 // Returns the instruction pointer (platform-dependent impl.). |
80 uintptr_t GetInstructionPointer() const; | 80 uintptr_t GetInstructionPointer() const; |
81 | 81 |
82 // Fills a RawContextCPU using the context in the ThreadInfo object. | 82 // Fills a RawContextCPU using the context in the ThreadInfo object. |
83 void FillCPUContext(RawContextCPU* out) const; | 83 void FillCPUContext(RawContextCPU* out) const; |
84 }; | 84 }; |
85 | 85 |
86 } // namespace google_breakpad | 86 } // namespace google_breakpad |
87 | 87 |
88 #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_ | 88 #endif // CLIENT_LINUX_DUMP_WRITER_COMMON_THREAD_INFO_H_ |
OLD | NEW |