summaryrefslogtreecommitdiffstats
path: root/tapset/conversions.stp
Commit message (Collapse)AuthorAgeFilesLines
* Fix [set_]kernel_pointer for 32-bitHEADmasterJosh Stone2010-04-131-1/+1
| | | | | * tapset/conversions.stp (kernel_pointer): Use uintptr_t casts. * tapset/conversions-guru.stp (set_kernel_pointer): Ditto.
* Title for kernel_pointer needs to be all on one line.William Cohen2010-04-081-2/+1
|
* Added kernel_pointer()/set_kernel_pointer() tapset functions.David Smith2010-04-071-1/+19
| | | | | | | | | | | * tapset/conversions.stp (kernel_pointer): New function. * tapset/conversions-guru.stp (set_kernel_pointer): Ditto. * testsuite/buildok/conversions-embedded.stp: Added kernel_pointer() test. * testsuite/buildok/conversions.stp: Ditto. * testsuite/buildok/set_kernel.stp: Added set_kernel_pointer() test. * tapset/nfs.stp: Removed __d_loff_t() function. Uses new kernel_pointer() function instead. * testsuite/buildok/nfs-embedded.stp: Removed __d_loff_t() test.
* Use clamping to more easily normalize input valuesJosh Stone2010-02-161-8/+4
| | | | | | The kernel has min/max/clamp macros to make range comparisons easier. Clamp is a newer invention, but we can define it for older kernels in terms of min and max.
* Add documentation for conversions.stp tapset functions.Mark Wielaard2009-11-121-7/+179
| | | | | * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add conversions.stp chapter. * tapset/conversions.stp: Add documentation for all functions.
* PR10650: markup some unprivileged-safe tapset functionsFrank Ch. Eigler2009-09-161-17/+33
| | | | | | | | | | | | | | | | | Add /* unprivileged */ to a variety of tapset embedded-c functions, together with uid-assertion-checking code as needed. This is only an initial set, and may need to grow or shrink after further testing. Prototyped-By: Dave Brolley <brolley@redhat.com> * runtime/runtime.h (is_myproc, assert_is_myproc): New macros. * runtime/addr-map.c (lookup_bad_addr): Reject if !is_myproc in unprivileged mode. * runtime/print.c (_stp_print_kernel_info): Add unprivileged mode info. * tapset/DEVGUIDE: Document /* pure */ and /* unprivileged */. * tapset/*.stp: Add /* unprivileged */ here and there, in questionable cases along with an assert_is_myproc().
* Correct a few comments to match the codeJosh Stone2009-08-261-4/+4
| | | | | | | * tapset/conversions.stp (kernel_long, kernel_int, kernel_short, kernel_char): All are actually using kread(), not deref(). * tapset/i386/registers.stp (_stp_arg): Ditto. * tapset/x86_64/registers.stp (_stp_arg): Ditto.
* Make sure user_string_n() results are always zero terminated strings.Mark Wielaard2009-04-281-1/+4
| | | | | | * tapset/conversions.stp (user_string_n2): Explicitly null terminate return string. (user_string_n_warn): Likewise.
* 2008-03-21 Eugene Teo <eugeneteo@kernel.sg>eteo2008-03-211-1/+129
| | | | | | | | | | | | PR 5528 * tapset/conversions.stp (user_string_n, user_string_n2, user_string_n_warn, user_string_n_quoted, user_short, user_short_warn, user_int, user_int_warn, user_long, user_long_warn, user_char, user_char_warn): New user_* functions. * stapfuncs.5.in: Documented the new functions. * testsuite/systemtap.stress/conversions.stp: Test new functions. * testsuite/buildok/conversions.stp: Test new functions. * testsuite/buildok/conversions-embedded.stp: Test new functions.
* 2007-10-15 Zhaolei <zhaolei@cn.fujitsu.com>zhaolei2007-10-151-0/+13
| | | | | | | | | | | From Cai Fei <caifei@cn.fujitsu.com> * conversions.stp: Add a function kernel_string_n for copy non-0-terminated string with fixed length from kernel space at given address. * stapfuncs.5.in: Add kernel_string_n. * nfsd.stp: Using kernel_string_n to copy non-0-terminated string with fixed length from kernel space at given address. * nfs_proc.stp: Ditto.
* * conversions.stp (user_string): Redefine in terms of user_string2.fche2007-09-241-6/+1
|
* 2007-08-10 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-111-55/+43
| | | | | | | | | | | | | | | | | | | PR 4593 * translate.cxx (c_unparser::emit_common_header): Add an error_buffer to the context to allow dynamic error messages. * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref fill in last_error with a detailed message. runtime/ * loc2c-runtime.h (deref, store_deref): Set an error message with the pointer value and name into last_error, since it's hard to determine the details once you've already jumped to deref_fault. tapset/ * conversions.stp (kernel_string, kernel_long, kernel_int, kernel_short, kernel_char, user_string_warn): Use the CONTEXT->error_buffer to create an error message instead of a static local array.
* (kernel_int) added goto success; (PR 4419)dwilder2007-03-011-0/+1
|
* 2007-02-09 Frank Ch. Eigler <fche@elastic.org>fche2007-02-091-11/+11
| | | | * conversions.stp (*): Make errmsg usage uniform.
* * kernel_{string,long,...,char} protected accessor functionsfche2007-02-061-3/+58
| | | | | | | | | | | | | | | | | | | | * test suites for all of 'em too * even documentation * mm, donuts 2007-02-06 Frank Ch. Eigler <fche@elastic.org> * stapfuncs.5.in: Add docs for kernel_{long,int,short,char} and some user_string* variants. 2007-02-06 Frank Ch. Eigler <fche@elastic.org> * conversions.stp (kernel_long/int/short/char): New functions. 2007-02-06 Frank Ch. Eigler <fche@elastic.org> * buildok/conversions.stp: Build-test all conversions.stp functions. * systemtap.stress/conversions.*: New test.
* *** empty log message ***hunt2006-07-111-9/+3
|
* 2006-07-04 Martin Hunt <hunt@redhat.com>hunt2006-07-041-0/+13
| | | | * syscalls.stp, syscalls2.stp: Use user_string_quoted().
* 2006-06-30 Martin Hunt <hunt@redhat.com>hunt2006-06-301-11/+26
| | | | | | | * conversions.stp (user_string): Don't generate errors on faults, just return <unknown>. (user_string2): New function. (user_string_warn): New function.
* 2006-05-16 David Smith <dsmith@redhat.com>dsmith2006-05-161-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | * conversions.stp (hexstring, string): Removed functions. Because of parser changes, "string" is now a reserved word and cannot be a function name. Use 'sprintf("0x%x", num)' to replace hexstring() and either 'sprint(num)' or 'sprintf("%d", num)' to replace string(). * syscalls.stp (syscall.accept, syscall.alarm, syscall.close, syscall.dup, syscall.epoll_create, syscall.exit, syscall.fchdir, syscall.fdatasync, syscall.fsync, syscall.getsid) Changed 'string()' calls to 'sprint()' calls. * syscalls2.stp (syscall.sched_get_priority_max, syscall.sched_get_priority_min, syscall.sched_getscheduler, syscall.setfsgid, syscall.setfsgid16, syscall.setfsuid, syscall.setfsuid16, syscall.setgid, syscall.setgid16, syscall.setuid, syscall.setuid16, syscall.ssetmask, syscall.timer_delete, syscall.timer_getoverrun): Ditto. * i686/syscalls.stp (syscall.iopl, syscall.rt_sigreturn, syscall.sigreturn): Ditto. * ppc64/syscalls.stp (syscall.ppc64_personality): Ditto. * x86_64/syscalls.stp (kernel.syscall.iopl, kernel.syscall.umask): Ditto. * test/ctostp.sh: Uses 'sprint()' instead of 'string()' in generated systemtap code.
* 2006-04-25 Frank Ch. Eigler <fche@elastic.org>fche2006-04-251-4/+4
| | | | | | | | | | | | | | | | | PR 2427. * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Support /* pure */ declaration. Stop using __tvar_ naming hack. (v_c_u::visit_print_format): Mark sprint and sprintf as side-effect-free. (deep_copy_visitor::visit_print_format): Propagate raw_components. * stap.1.in: Document declaration. * elaborate.cxx (semantic_pass_opt2): Verbose message tweak. (dead_stmtexpr_remover): Extend for more aggressive optimization. * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add /* pure */ declaration to rvalue expansions. * tapset/*.stp: Added /* pure */ declarations to many functions. * testsuite/parseok/unparsers.stp: Propagate guru mode flag. * testsuite/buildok/twentyfour.stp: New test.
* 2006-04-18 Frank Ch. Eigler <fche@elastic.org>fche2006-04-181-2/+2
| | | | | | | | | | | | | | | | | PR 2220 * translate.cxx (visit_statement): Tolerate 0 first argument. (visit_for_loop, visit_foreach_loop): Call it thusly for condition expression. (visit_embededcode, visit_block, visit_null_statement): Don't call visit_statement() at all. 2006-04-18 Frank Ch. Eigler <fche@elastic.org> * conversions.stp (string, hex_string): Use snprintf for safety. 2006-04-18 Frank Ch. Eigler <fche@elastic.org> * systemtap.samples/control_limits.stp: Adapt to new action counting.
* Fix accidentally commented out error message.hunt2006-04-181-4/+5
|
* 2006-02-07 Martin Hunt <hunt@redhat.com>hunt2006-02-071-4/+4
| | | | | | | | | | | | | * syscalls.stp: Latest. * syscalls2.stp: Commented out pciconfig calls. Those need to go in arch-specific directories. * aux_syscalls.stp (_access_mode_str): Fix. (_mmap_flags): New Function. (_mprotect_prot_str): Fix. (__string): New. (__get_argv): New. (__fork_flags): New.
* Remove inadventently checked in change.hunt2006-02-011-17/+1
|
* 2006-02-01 Martin Hunt <hunt@redhat.com>hunt2006-02-011-0/+16
| | | | | | | * syscalls.stp: New syscall file. * syscall2.stp: More syscalls. * i686/syscalls.stp: x86-specific calls. * x86_64/syscalls.stp: x86_64-specific calls.
* gpl headersfche2005-09-281-1/+8
|
* 2005-09-03 Frank Ch. Eigler <fche@elastic.org>fche2005-09-031-0/+28
| | | | | | | | PR 1187 prime * tapset.cxx (literal_stmt_for_local): Don't automgaically copy target char*'s to systemtap strings. * tapset/conversions.stp (user_string, kernel_string): New functions. * stapfuncs.5.in: Document new functions.
* 2005-09-03 Frank Ch. Eigler <fche@elastic.org>fche2005-09-031-8/+2
| | | | | | | | | | PR 1292, by popular request. * parse.cxx (parse_functiondecl): Allow optional value/param type declarations. * stap.1.in: Document this. * tapset/*.stp: Convert most functions accordingly. * testsuite/parseok/twelve.stp, semok/seven.stp, semko/twenty.stp: Test this.
* 2005-09-02 Frank Ch. Eigler <fche@elastic.org>fche2005-09-021-0/+14
* tapset/*.stp: Renamed several files to simplify names.