From 0301cfe75d47bc8e26607ef8372c76239a487113 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 26 Mar 2008 21:22:26 +0000 Subject: 2008-03-26 Frank Ch. Eigler * translate.cxx (emit_function): Set context last_stmt, in case an error occurs during the function. --- tapsets.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index a9db3717..39aa60ad 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1587,6 +1587,15 @@ struct dwflpp unsigned i = 0; while (i < components.size()) { + /* XXX: This would be desirable, but we don't get the target_symbol token, + and printing that gives us the file:line number too early anyway. */ +#if 0 + // Emit a marker to note which field is being access-attempted, to give + // better error messages if deref() fails. + string piece = string(...target_symbol token...) + string ("#") + stringify(components[i].second); + obstack_printf (pool, "c->last_stmt = %s;", lex_cast_qstring(piece).c_str()); +#endif + die = dwarf_formref_die (attr_mem, die_mem); const int typetag = dwarf_tag (die); switch (typetag) -- cgit From 1e00cfb1b6caa8b8ac343fac8e3d08f2d6a5d785 Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 27 Mar 2008 19:31:51 +0000 Subject: 2008-03-27 Frank Ch. Eigler * tapsets.cxx (common_probe_entryfn_prologue): Clear last_stmt. --- tapsets.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 39aa60ad..079d87e8 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -201,6 +201,7 @@ common_probe_entryfn_prologue (translator_output* o, string statestr, o->newline() << "goto probe_epilogue;"; o->newline(-1) << "}"; o->newline(); + o->newline() << "c->last_stmt = 0;"; o->newline() << "c->last_error = 0;"; o->newline() << "c->nesting = 0;"; o->newline() << "c->regs = 0;"; -- cgit