summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorhunt <hunt>2006-04-10 04:53:03 +0000
committerhunt <hunt>2006-04-10 04:53:03 +0000
commitdc0b623a28b4185e155f16a9cf63a8f22c528b5f (patch)
tree335e23bf57e912c02660c7b185d6688fc8058bcb /elaborate.cxx
parente06d0f85845165d3d9333fe9e98deade672cd4c8 (diff)
downloadsystemtap-steved-dc0b623a28b4185e155f16a9cf63a8f22c528b5f.tar.gz
systemtap-steved-dc0b623a28b4185e155f16a9cf63a8f22c528b5f.tar.xz
systemtap-steved-dc0b623a28b4185e155f16a9cf63a8f22c528b5f.zip
2006-04-09 Martin Hunt <hunt@redhat.com>
Add binary printf support. * elaborate.cxx (visit_print_format): Don't include conv_literal or conv_size in components vector. Add conv_binary to switch statement. * translate.cxx (visit_print_format): Eliminate special cast to (long long) for pe_long because new vsnprintf uses int64_t. * staptree.h (struct print_format): Add conv_binary and conv_size. * staptree.cxx (components_to_string): Add conv_binary case. Add conv_size case. (string_to_components): Add cases for 'b' and 'n'
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 6dc0ecd8..ea394f94 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -2247,7 +2247,8 @@ typeresolution_info::visit_print_format (print_format* e)
if (e->components[i].type == print_format::conv_unspecified)
throw semantic_error ("Unspecified conversion in print operator format string",
e->tok);
- else if (e->components[i].type == print_format::conv_literal)
+ else if (e->components[i].type == print_format::conv_literal
+ || e->components[i].type == print_format::conv_size)
continue;
components.push_back(e->components[i]);
}
@@ -2267,9 +2268,9 @@ typeresolution_info::visit_print_format (print_format* e)
switch (components[i].type)
{
-
case print_format::conv_unspecified:
case print_format::conv_literal:
+ case print_format::conv_size:
assert (false);
break;
@@ -2279,6 +2280,7 @@ typeresolution_info::visit_print_format (print_format* e)
case print_format::conv_unsigned_ptr:
case print_format::conv_unsigned_uppercase_hex:
case print_format::conv_unsigned_lowercase_hex:
+ case print_format::conv_binary:
wanted = pe_long;
break;