From 2d81f04529d752e536c7a44d9a7c8b06371ac7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 14 Jan 2008 14:04:35 +0000 Subject: [PATCH] * If the "traced" KDL command is used with only one argument, it's the index now, not the number of entries shown (much more usable this way). * Added missing license. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23520 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/debug/tracing.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/system/kernel/debug/tracing.cpp b/src/system/kernel/debug/tracing.cpp index 5ab8b5fc2f..f5b61fb37b 100644 --- a/src/system/kernel/debug/tracing.cpp +++ b/src/system/kernel/debug/tracing.cpp @@ -1,9 +1,16 @@ +/* + * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2008, Axel Dörfler, axeld@pinc-software.de. + * Distributed under the terms of the MIT License. + */ + + #include -#include - #include +#include + #if ENABLE_TRACING @@ -179,11 +186,11 @@ dump_tracing(int argc, char** argv) pattern = argv[--argc] + 1; int32 count = 30; - if (argc == 2) - count = strtol(argv[1], NULL, 0); - int32 start = sEntries - count; + if (argc == 2) + start = strtol(argv[1], NULL, 0); + if (argc == 3) { start = strtol(argv[1], NULL, 0); count = strtol(argv[2], NULL, 0); @@ -238,6 +245,7 @@ dump_tracing(int argc, char** argv) #endif // ENABLE_TRACING + extern "C" uint8* alloc_tracing_buffer(size_t size) {