From 8d164e0cd719fff3db67b868b0d942c7296890a2 Mon Sep 17 00:00:00 2001 From: jistone Date: Sat, 11 Aug 2007 02:19:25 +0000 Subject: 2007-08-10 Josh Stone PR 4593 * translate.cxx (c_unparser::emit_common_header): Add an error_buffer to the context to allow dynamic error messages. * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref fill in last_error with a detailed message. runtime/ * loc2c-runtime.h (deref, store_deref): Set an error message with the pointer value and name into last_error, since it's hard to determine the details once you've already jumped to deref_fault. tapset/ * conversions.stp (kernel_string, kernel_long, kernel_int, kernel_short, kernel_char, user_string_warn): Use the CONTEXT->error_buffer to create an error message instead of a static local array. --- translate.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index e6bd4e12..54878a40 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1,6 +1,6 @@ // translation pass // Copyright (C) 2005-2007 Red Hat Inc. -// Copyright (C) 2005, 2006 Intel Corporation +// Copyright (C) 2005-2007 Intel Corporation. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -853,6 +853,7 @@ c_unparser::emit_common_header () o->newline() << "const char *probe_point;"; o->newline() << "int actionremaining;"; o->newline() << "unsigned nesting;"; + o->newline() << "string_t error_buffer;"; o->newline() << "const char *last_error;"; // NB: last_error is used as a health flag within a probe. // While it's 0, execution continues -- cgit