another probe-pattern type to implement
If the nnn in relative(nnn) just means a number of lines, this can be implemented two ways: - if the LHS is a source-line coordinate, (if dwarf_query::spec_type equals function_file_and_line) you can add nnn to the line number and perform a normal match. - otherwise resolve the LHS to a function or address, map to a line number, and then add nnn to that line number and behave as though you were given a function_file_and_line query.
As for syntax, .relative(N) may be OK, but so could something shoved into the basic description string: .statement("function@file.c+5") # note "+" instead of ":" to indicate relative to first line of function This whole option probably only makes sense for statement probes that include function names.
Add .statement("function@file.c+N") * tapsets.cxx (dwflpp::iterate_over_srcfile_lines): Add parameter line_type_relative. (enum line_t): New. (dwarf_query::line_type): New. (dwarf_query::parse_function_spec): Set line_type.