This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "no match" semantic error for some existing probe points


On Nov  1, 2006, "Gui,Jian" <guij@cn.ibm.com> wrote:

> Alexandre Oliva wrote:
>> Indeed, but this is an inlined call of ptrace_disabled.  What we're
>> missing is info about the clear_single_step() inlined call.  However,
>> in my kernel source tree, clear_single_step is a macro, not a
>> function, so you won't get debug info for it without -g3 and, even
>> then, you may not get any line numbers whatsoever for the function
>> that does nothing but call a macro.
> In 2.6.18.1, clear_single_step is defined as an inlined call in
> arch/powerpc/kernel/ptrace.c (ppc64) or
> arch/powerpc/kernel/ptrace.c (ppc32). Although it is also defined
> as macro in arch/powerpc/kernel/traps.c, I think ptrace_disable is
> using its inlined call definition.

> Thanks. I've opened bug 3441 for this and attached some data.
> http://sourceware.org/bugzilla/show_bug.cgi?id=3441

> Please let me know if more info is needed.

Thanks, I've located the problem.  I missed a hunk when backporting
the patch that was meant to add this debug info; one of the hunks in
the original patch translated to two identical changes elsewhere, and
the second hunk in the same file had to be applied to a completely
different piece of code that I didn't recognize back then.  As a
result, we ended up without the desired info in many cases.  The patch
below is a fix, that brings in the last hunk in the patch to
tree-inline.c in the GCC trunk that generated revision 102379.

Jakub, do you want a patch for the patch file, or is this good enough?
I guess we need a bug report in Red Hat's bugzilla to get a fix into
some RHEL 4 update, right?

Gui,Jian, do you want to file the bug report at
bugzilla.redhat.com/bugzilla yourself, to keep track of it, or would
you like us to take care of it?

This patch fixes a change that went missing in the
gcc34-dwarf2-inline-details.patch backport.

for gcc/ChangeLog
2006-11-07  Alexandre Oliva  <aoliva@redhat.com>

	* tree-inline.c (expand_call_inline): Set BLOCK_SOURCE_LOCATION.

Index: gcc/tree-inline.c
===================================================================
--- gcc/tree-inline.c.orig	2006-10-13 04:31:24.000000000 -0300
+++ gcc/tree-inline.c	2006-11-07 04:06:10.000000000 -0200
@@ -1253,6 +1253,7 @@ expand_call_inline (tree *tp, int *walk_
   tree args;
   tree return_slot_addr;
   const char *reason;
+  location_t incoming_loc = input_location;
 
   /* See what we've got.  */
   id = (inline_data *) data;
@@ -1464,7 +1465,10 @@ expand_call_inline (tree *tp, int *walk_
   /* Tell the debugging backends that this block represents the
      outermost scope of the inlined function.  */
   if (SCOPE_STMT_BLOCK (scope_stmt))
-    BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope_stmt)) = DECL_ORIGIN (fn);
+    {
+      BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope_stmt)) = DECL_ORIGIN (fn);
+      BLOCK_SOURCE_LOCATION (SCOPE_STMT_BLOCK (scope_stmt)) = incoming_loc;
+    }
 
   /* Declare the return variable for the function.  */
   COMPOUND_BODY (stmt)
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]