Bug 32894 - Debugger-Inspect cannot deal with octal constants
Summary: Debugger-Inspect cannot deal with octal constants
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 33450
Blocks:
  Show dependency tree
 
Reported: 2003-02-25 04:18 EST by Stefan Matthias Aust CLA
Modified: 2003-02-28 10:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Matthias Aust CLA 2003-02-25 04:18:04 EST
I'm using 2.1 RC1.  Debug some program.  Type "\012\015", select the string an
choose "Inspect" from the context menu.  It tells you that this string has 6
characters, an unidentifiable char (probably 0), a '1', a '2' and so on.  Of
course the string should contain only two characters, namely "\n\r".  

The compiler and the scrapbook evaluator do it right.  The debug inspect has no
problems with "\n\r".  It has problems with "\u000a" but that's probably a
different bug to report.

The debug inspect has even more problems with character constants - it ignores
them.  You cannot inspect them.  You can inspect them in the scrapbook though.
Comment 1 Darin Wright CLA 2003-02-25 10:09:59 EST
The scrapbook actually compiles into classfiles (and the compiler does the 
conversion for us). The debugger evaluations are done via an interpreter. Thus, 
the difference.
Comment 2 Darin Wright CLA 2003-02-26 17:45:08 EST
Luc, do you know if there is any "simple" way we can get this type of pre-
processing from the compiler (i.e. constant conversions)? (My feeling is that 
we will have to defer this one for post 2.1 consideration).
Comment 3 Luc Bourlier CLA 2003-02-27 11:48:25 EST
I think it's a jdt-core bug. I entered a new bug (bug 33450).
Comment 4 Luc Bourlier CLA 2003-02-27 12:01:10 EST
Stefan: just for information, the behavior you see with "\u000a" is not bug, it
behave how it's describe in the java language specification. The unicode escape
sequences have to be replace before the 'real' parsing begins. \u000a will be
replace by a linefeed.

String s= "test\u000atest";

is equivalent to

String s= "test
test";

which is invalide in Java.
Comment 5 Luc Bourlier CLA 2003-02-27 15:07:18 EST
The jdt-core bug has been fixed.
We have to add a regression test to the eval test suite.
Comment 6 Luc Bourlier CLA 2003-02-28 10:16:16 EST
No need for a test, it's a jdt-core problem, they have a regression test.