From 6a35d102ce201e142f1133d9d5f0df6d47e3cd66 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 22 Jun 2009 16:48:30 +0200 Subject: PR10307 beginning of statement check should be overridden in guru mode. * tapsets.cxx (query_cu): When in guru mode just issue an warning (if not suppressed) instead of an error when address isn't at the beginning of a statement. --- tapsets.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 15dbeb81..bc09e168 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1639,6 +1639,7 @@ query_cu (Dwarf_Die * cudie, void * arg) // statement. This is a somewhat lame check that the address // is at the start of an assembly instruction. Mark probes are in the // middle of a macro and thus not strictly at a statement beginning. + // Guru mode may override this check. if (q->has_statement_num && ! q->has_mark) { Dwarf_Addr queryaddr = q->statement_num_val; @@ -1651,7 +1652,10 @@ query_cu (Dwarf_Die * cudie, void * arg) stringstream msg; msg << "address 0x" << hex << queryaddr << " does not match the beginning of a statement"; - throw semantic_error(msg.str()); + if (! q->sess.guru_mode) + throw semantic_error(msg.str()); + else if (! q->sess.suppress_warnings) + q->sess.print_warning(msg.str()); } } // Pick up [entrypc, name, DIE] tuples for all the functions -- cgit