From ef56478712cf797380b3057ddeca13dcec064656 Mon Sep 17 00:00:00 2001 From: eteo Date: Fri, 21 Mar 2008 14:35:25 +0000 Subject: 2008-03-21 Eugene Teo 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. --- stapfuncs.5.in | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'stapfuncs.5.in') diff --git a/stapfuncs.5.in b/stapfuncs.5.in index 85a00b37..9bca845d 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -92,6 +92,60 @@ fault, return instead the err_msg value. user_string_warn:string (addr:long) Copy a string from user space at given address. If the access would fault, signal a warning and return "". +.TP +user_string_quoted:string (addr:long) +Copy a string from user space at given address. Any ASCII characters +that are not printable are replaced by the corresponding escape +sequence in the returned string. +.TP +user_string_n:string (addr:long, n:long) +Copy a string of n bytes from user space at given address. If the access +would fault, return "". +.TP +user_string_n2:string (addr:long, n:long, err_msg:string) +Copy a string of n bytes from user space at given address. If the access +would fault, return the err_msg value. +.TP +user_string_n_warn:string (addr:long, n:long) +Copy a string of n bytes from user space at given address. If the access +would fault, signal a warning and return "". +.TP +user_string_n_quoted:string (addr:long, n:long) +Copy a string of n bytes from user space at given address. Any ASCII +characters that are not printable are replaced by the corresponding escape +sequence in the returned string. If the access would fault, return "". +.TP +user_short:long (addr:long) +Copy a short from user space at given address. If the access would fault, +return 0. +.TP +user_short_warn:long (addr:long) +Copy a short from user space at given address. If the access would fault, +signal a warning and return 0. +.TP +user_int:long (addr:long) +Copy an int from user space at given address. If the access would fault, +return 0. +.TP +user_int_warn:long (addr:long) +Copy an int from user space at given address. If the access would fault, +signal a warning and return 0. +.TP +user_long:long (addr:long) +Copy a long from user space at given address. If the access would fault, +return 0. +.TP +user_long_warn:long (addr:long) +Copy a long from user space at given address. If the access would fault, +signal a warning and return 0. +.TP +user_char:long (addr:long) +Copy a char from user space at given address. If the access would fault, +return 0. +.TP +user_char_warn:long (addr:long) +Copy a char from user space at given address. If the access would fault, +signal a warning and return 0. .SS STRING .TP strlen:long (str:string) -- cgit