From: Reinhard Tartler <siretart@tauware.de>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] show_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types
Date: Thu, 30 Apr 2009 23:08:53 +0200 [thread overview]
Message-ID: <87tz0ek0is.fsf@faui44a.informatik.uni-erlangen.de> (raw)
These cases are probably never hit with "regular" codepaths, but are
useful when called in a gdb session to print token sequences.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
---
tokenize.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/tokenize.c b/tokenize.c
index 6b67b96..93dd007 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -162,9 +162,18 @@ const char *show_token(const struct token *token)
case TOKEN_STREAMEND:
sprintf(buffer, "<end of '%s'>", stream_name(token->pos.stream));
return buffer;
-
+
+ case TOKEN_UNTAINT:
+ sprintf(buffer, "<untaint>");
+ return buffer;
+
+ case TOKEN_ARG_COUNT:
+ sprintf(buffer, "<argcnt>");
+ return buffer;
+
default:
- return "WTF???";
+ sprintf(buffer, "unhandled token type '%d' ", token_type(token));
+ return buffer;
}
}
--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
next reply other threads:[~2009-08-11 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 21:08 Reinhard Tartler [this message]
2009-08-11 20:39 ` [PATCH] show_token: handle TOKEN_UNTAINT and TOKEN_ARG_COUNT types Chris Li
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=87tz0ek0is.fsf@faui44a.informatik.uni-erlangen.de \
--to=siretart@tauware.de \
--cc=linux-sparse@vger.kernel.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 NNTP newsgroup(s).