hrev44879 adds 2 changesets to branch 'master' old head: bb7d146c64d025442c6798caf2d13114dfd18deb new head: 0bbe873d9ef75106185e529f07d79695f1273b70 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=0bbe873+%5Ebb7d146 ---------------------------------------------------------------------------- e03ee8b: Add missing include. 0bbe873: Add some basic system information to the report header. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 28 insertions(+) headers/private/shared/cpu_type.h | 1 + .../controllers/DebugReportGenerator.cpp | 27 ++++++++++++++++++++ ############################################################################ Commit: e03ee8ba353ea8b007c4f3966ff057540e2decf9 URL: http://cgit.haiku-os.org/haiku/commit/?id=e03ee8b Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Fri Nov 23 15:55:50 2012 UTC Add missing include. ---------------------------------------------------------------------------- diff --git a/headers/private/shared/cpu_type.h b/headers/private/shared/cpu_type.h index 2c97ae1..b1828a8 100644 --- a/headers/private/shared/cpu_type.h +++ b/headers/private/shared/cpu_type.h @@ -9,6 +9,7 @@ #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <OS.h> ############################################################################ Revision: hrev44879 Commit: 0bbe873d9ef75106185e529f07d79695f1273b70 URL: http://cgit.haiku-os.org/haiku/commit/?id=0bbe873 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Fri Nov 23 15:56:06 2012 UTC Add some basic system information to the report header. ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/controllers/DebugReportGenerator.cpp b/src/apps/debugger/controllers/DebugReportGenerator.cpp index 254f0b8..82f9d52 100644 --- a/src/apps/debugger/controllers/DebugReportGenerator.cpp +++ b/src/apps/debugger/controllers/DebugReportGenerator.cpp @@ -6,8 +6,12 @@ #include "DebugReportGenerator.h" +#include <cpu_type.h> +#include <system_revision.h> + #include <AutoLocker.h> #include <File.h> +#include <StringForSize.h> #include "Architecture.h" #include "CpuState.h" @@ -100,6 +104,29 @@ DebugReportGenerator::_GenerateReportHeader(BString& _output) fTeam->Name(), fTeam->ID()); _output << data; + // TODO: this information should probably be requested via the debugger + // interface, since e.g. in the case of a remote team, the report should + // include data about the target, not the debugging host + system_info info; + if (get_system_info(&info) == B_OK) { + data.SetToFormat("CPU(s): %" B_PRId32 "x %s %s\n", + info.cpu_count, get_cpu_vendor_string(info.cpu_type), + get_cpu_model_string(&info)); + _output << data; + char maxSize[32]; + char usedSize[32]; + + data.SetToFormat("Memory: %s total, %s used\n", + BPrivate::string_for_size((int64)info.max_pages * B_PAGE_SIZE, + maxSize, sizeof(maxSize)), + BPrivate::string_for_size((int64)info.used_pages * B_PAGE_SIZE, + usedSize, sizeof(usedSize))); + _output << data; + } + + data.SetToFormat("Haiku revision: %s\n", __get_haiku_revision()); + _output << data; + return B_OK; }