From: "mjw at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/14431] char * always being printed as, possibly INVALID/NULL "<unknown>", string without giving actual address
Date: Mon, 06 Aug 2012 18:59:00 -0000 [thread overview]
Message-ID: <bug-14431-6586-ZRxpdNYheR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14431-6586@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14431
--- Comment #5 from Mark Wielaard <mjw at redhat dot com> 2012-08-06 18:59:22 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > >
> > > It's tough to automagically do The Right Thing without knowing what the user is
> > > looking for.
> >
> > Yes, that is why we should just give all information instead of guessing what
> > the user wants.
>
> But too much information will make it difficult to read.
Of course. But having the address there isn't too much, is it?
> I meant that since the value of kernel pointers on 64-bit will always take 16
> characters, it clutters the output quite a bit. That may be a matter of
> opinion, but this is supposed to be "pretty" printing.
Aha. I think this is "pretty", and not cluttered. But can easily be convinced
of any other formatting. So you have a different suggestion for adding the
address?
> > I do like the usage of plain ? instead of "<unknown>".
>
> Note the difference that I proposed it *without* quotes, so it's clear that the
> string is not really "?".
ah, yes, but that is somewhat more difficult since then we have to be
more fancy about the results of [kernel|user]_string2(). How about using
"<?>".
> > Is that really that simple? I wasn't able to do that easily. Except by printing
> > the fields individually with my own identifiers.
>
> Yes, you'd print fields yourself individually to get the formatting you really
> want.
Which isn't really practical for larger/deeper structs.
And [unsigned] char * is kind of special since it is often not used as
string pointer, so warrants having the address around always.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
next prev parent reply other threads:[~2012-08-06 18:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 10:30 [Bug translator/14431] New: NULL/invalid char * pretty printed as "<unknown>" string mjw at redhat dot com
2012-08-04 22:58 ` [Bug translator/14431] " mjw at redhat dot com
2012-08-05 20:29 ` jistone at redhat dot com
2012-08-06 8:43 ` [Bug translator/14431] char * always being printed as, possibly INVALID/NULL "<unknown>", string without giving actual address mjw at redhat dot com
2012-08-06 15:32 ` mjw at redhat dot com
2012-08-06 17:24 ` jistone at redhat dot com
2012-08-06 18:59 ` mjw at redhat dot com [this message]
2015-10-21 18:50 ` fche 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=bug-14431-6586-ZRxpdNYheR@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@sourceware.org \
/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).