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/6905] process("a").statement("main@/root/a.c:*") fails by giving error message.


------- Additional Comments From srinivasa at in dot ibm dot com  2008-09-19 11:16 -------
Passing invalid line number(line number greater than last line of the file) to
dwarf_getsrc_file() is causing the problem.
=================================================================
 void iterate_over_srcfile_lines (char const * srcfile,
                                   int lines[2],
                                   bool need_single_match,
                                   enum line_t line_type,
                                   void (* callback) (const dwarf_line_t& line,
                                                      void * arg),
                                   void *data)
  {
    Dwarf_Line **srcsp = NULL;
    size_t nsrcs = 0;
    dwarf_query * q = static_cast<dwarf_query *>(data);
    int lineno = lines[0];
    auto_free_ref<Dwarf_Line**> free_srcsp(srcsp);

    get_module_dwarf();
    ...........................
    ...........................
    dwarf_assert ("dwarf_getsrc_file",
                      dwarf_getsrc_file (module_dwarf,
                                         srcfile, l, 0,
                                         &srcsp, &nsrcs));
        if (line_type == WILDCARD || line_type == RANGE)
          {
            Dwarf_Addr line_addr;
            dwarf_lineno (srcsp [0], &lineno);
            line_probed = lines_probed.insert(lineno);
            if (lineno != l || line_probed.second == false || nsrcs > 1)
              continue;
            dwarf_lineaddr (srcsp [0], &line_addr);
            if (dwarf_haspc (function, line_addr) != 1)
              break;
          }
=======================================================

-- 


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

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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