PageRenderTime 14ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 1ms

/thirdparty/breakpad/google_breakpad/processor/system_info.h

http://github.com/tomahawk-player/tomahawk
C Header | 97 lines | 26 code | 15 blank | 56 comment | 0 complexity | 96f9451aacdec1a164953e99b3ef3c49 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-3.0, GPL-2.0
  1. // Copyright (c) 2006, Google Inc.
  2. // All rights reserved.
  3. //
  4. // Redistribution and use in source and binary forms, with or without
  5. // modification, are permitted provided that the following conditions are
  6. // met:
  7. //
  8. // * Redistributions of source code must retain the above copyright
  9. // notice, this list of conditions and the following disclaimer.
  10. // * Redistributions in binary form must reproduce the above
  11. // copyright notice, this list of conditions and the following disclaimer
  12. // in the documentation and/or other materials provided with the
  13. // distribution.
  14. // * Neither the name of Google Inc. nor the names of its
  15. // contributors may be used to endorse or promote products derived from
  16. // this software without specific prior written permission.
  17. //
  18. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. // system_info.h: Information about the system that was running a program
  30. // when a crash report was produced.
  31. //
  32. // Author: Mark Mentovai
  33. #ifndef GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__
  34. #define GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__
  35. #include <string>
  36. namespace google_breakpad {
  37. using std::string;
  38. struct SystemInfo {
  39. public:
  40. SystemInfo() : os(), os_short(), os_version(), cpu(), cpu_info(),
  41. cpu_count(0) {}
  42. // Resets the SystemInfo object to its default values.
  43. void Clear() {
  44. os.clear();
  45. os_short.clear();
  46. os_version.clear();
  47. cpu.clear();
  48. cpu_info.clear();
  49. cpu_count = 0;
  50. }
  51. // A string identifying the operating system, such as "Windows NT",
  52. // "Mac OS X", or "Linux". If the information is present in the dump but
  53. // its value is unknown, this field will contain a numeric value. If
  54. // the information is not present in the dump, this field will be empty.
  55. string os;
  56. // A short form of the os string, using lowercase letters and no spaces,
  57. // suitable for use in a filesystem. Possible values are "windows",
  58. // "mac", and "linux". Empty if the information is not present in the dump
  59. // or if the OS given by the dump is unknown. The values stored in this
  60. // field should match those used by MinidumpSystemInfo::GetOS.
  61. string os_short;
  62. // A string identifying the version of the operating system, such as
  63. // "5.1.2600 Service Pack 2" or "10.4.8 8L2127". If the dump does not
  64. // contain this information, this field will be empty.
  65. string os_version;
  66. // A string identifying the basic CPU family, such as "x86" or "ppc".
  67. // If this information is present in the dump but its value is unknown,
  68. // this field will contain a numeric value. If the information is not
  69. // present in the dump, this field will be empty. The values stored in
  70. // this field should match those used by MinidumpSystemInfo::GetCPU.
  71. string cpu;
  72. // A string further identifying the specific CPU, such as
  73. // "GenuineIntel level 6 model 13 stepping 8". If the information is not
  74. // present in the dump, or additional identifying information is not
  75. // defined for the CPU family, this field will be empty.
  76. string cpu_info;
  77. // The number of processors in the system. Will be greater than one for
  78. // multi-core systems.
  79. int cpu_count;
  80. };
  81. } // namespace google_breakpad
  82. #endif // GOOGLE_BREAKPAD_PROCESSOR_SYSTEM_INFO_H__