This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/2014] cannot use backslash for escape sequences
- From: "eteo at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 20 Apr 2006 03:57:18 -0000
- Subject: [Bug translator/2014] cannot use backslash for escape sequences
- References: <20051209171450.2014.hunt@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From eteo at redhat dot com 2006-04-20 03:57 -------
I have added the \[0-7]* case to preserve octal escape sequences. I
will be adding a test case to the testsuite soon.
[eteo@eteo systemtap]$ cat octal.stp
probe begin {
printf("\033[2J");
printf("\033[31;47mHello Frank\033[0;0m\12");
printf("\012testing\012test\012\934\012\0075\012\7ab\012\89\012");
}
[eteo@eteo systemtap]$ stap -v octal.stp
Pass 1: parsed user script and 16 library script(s) in 240usr/10sys/258real ms.
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 global(s) in
0usr/0sys/5real ms.
Pass 3: translated to C into "/home/eteo/tmp/stapBS4VbH/stap_24454.c" in
200usr/90sys/340real ms.
Pass 4: compiled C into "stap_24454.ko" in 3150usr/240sys/3469real ms.
Pass 5: starting run.
(clears screen)
Hello Frank (displays text in red on white)
(two newlines)
testing
test
934
5
ab
89
Here's the patch:
diff -Naurp src.default/ChangeLog src/ChangeLog
--- src.default/ChangeLog 2006-04-19 04:27:33.000000000 +0800
+++ src/ChangeLog 2006-04-20 11:17:02.000000000 +0800
@@ -1,3 +1,9 @@
+2006-04-19 Eugene Teo <eteo@redhat.com>
+
+ PR 2014
+ * parse.cxx (lexer::scan): Added \[0-7]* case to preserve
+ octal escape sequences.
+
2006-04-18 Martin Hunt <hunt@redhat.com>
* Makefile.am (install-data-local): Another try.
diff -Naurp src.default/parse.cxx src/parse.cxx
--- src.default/parse.cxx 2006-03-04 02:37:33.000000000 +0800
+++ src/parse.cxx 2006-04-20 11:12:20.000000000 +0800
@@ -553,6 +553,7 @@ lexer::scan ()
case 'v':
case 'f':
case 'r':
+ case '0' ... '7':
case '\\':
// Pass these escapes through to the string value
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|systemtap at sources dot |eteo at redhat dot com
|redhat dot com |
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=2014
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.