public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "hunt at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sources.redhat.com
Subject: [Bug tapsets/2861] user_string fault handling
Date: Thu, 29 Jun 2006 01:08:00 -0000	[thread overview]
Message-ID: <20060628215948.4110.qmail@sourceware.org> (raw)
In-Reply-To: <20060628164947.2861.hunt@redhat.com>


------- Additional Comments From hunt at redhat dot com  2006-06-28 21:59 -------
Subject: Re:  user_string fault handling

On Wed, 2006-06-28 at 18:56 +0000, fche at redhat dot com wrote:
> ------- Additional Comments From fche at redhat dot com  2006-06-28 18:56 -------
> For the short term, I would like to see a separate user_string() variant that
> silently tolerates errors.  This variant could return a fixed string in this
> case, or (even better) the string given by an additional parameter:
> 
>    user_string (addr) ==> noisily fails as presently
>    user_string2 (addr,msg) ==> quietly returns msg on access error
> 
> The syscalls tapset would presumably switch to the second form.

Is there really a need for a caller-specified error message that would
justify the overhead of the extra strcpy? 

I'd like to avoid changing all the current code. How about

user_string(addr) ==> returns "<unknown>" on error
user_string(addr, 0) ==> same as above but prints warning
user_string(addr, 1) ==> prints error message and sets lasterr

> One might modify the translator to permit overloading by function arity, thus
> not requiring such awesome creativity with function naming.

A good idea independent regardless of how we solve this problem. Is
there a PR for it?




-- 


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

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

  parent reply	other threads:[~2006-06-28 21:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 18:56 [Bug tapsets/2861] New: " hunt at redhat dot com
2006-06-28 20:43 ` [Bug tapsets/2861] " fche at redhat dot com
2006-06-28 20:49 ` varap at us dot ibm dot com
2006-06-28 20:54 ` hien at us dot ibm dot com
2006-06-29  1:08 ` hunt at redhat dot com [this message]
2006-06-29  2:12 ` fche at redhat dot com
2006-06-29  3:16   ` James Dickens
2006-06-30 19:13   ` Martin Hunt
2006-06-29  9:31 ` jamesd dot wi at gmail dot com
2006-06-30 20:10 ` hunt at redhat dot com
2006-07-11 21:17 ` hunt at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060628215948.4110.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).