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]

[Bug translator/13315] New: @cast() should also accept an object file to extract typedie info


http://sourceware.org/bugzilla/show_bug.cgi?id=13315

             Bug #: 13315
           Summary: @cast() should also accept an object file to extract
                    typedie info
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: fche@redhat.com
    Classification: Unclassified


The translator supports a couple of syntaxes to generate/find debuginfo
for @cast expressions.  One that's missing is

    @cast(value,"typename","/path/to/object/file")

where said file is to be used directly as a source of elf/dwarf, rather
than interpreted as a header.  For example:

% cat foo.c
#include <stdlib.h>
struct foo { int bar; int zoo; };
void main ()
{ 
  struct foo* bar = malloc(sizeof (struct foo));
}
% gcc -g -c foo.c
% ls -al foo.o
% readelf -w foo.o | less  # to inspect struct foo decl is indeed there
% stap -p4 -e 'probe begin { println(@cast(0,"foo","./foo.o")->bar) }'
semantic error: type definition 'foo' not found: identifier '@cast' at
<input>:1:23
        source: probe begin { println(@cast(0,"foo","./foo.o")->bar) }
                                      ^
oops

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


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