Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329283 - Providing X10 language support in SDM
Summary: Providing X10 language support in SDM
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Debug SDM (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Greg Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 14:13 EDT by Xuan Chen CLA
Modified: 2010-11-30 15:34 EST (History)
0 users

See Also:


Attachments
code for X10 language support in SDM (302.91 KB, text/plain)
2010-11-02 14:14 EDT, Xuan Chen CLA
g.watson: iplog+
Details
Updated patch (based on current HEAD, and add some fixes (305.09 KB, patch)
2010-11-12 11:06 EST, Xuan Chen CLA
g.watson: iplog+
Details | Diff
Updated according to Greg's comment. Thanks. (296.31 KB, patch)
2010-11-17 17:10 EST, Xuan Chen CLA
no flags Details | Diff
Updated patch (removed some tryout code) (294.58 KB, text/plain)
2010-11-18 12:39 EST, Xuan Chen CLA
g.watson: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xuan Chen CLA 2010-11-02 14:13:16 EDT
Add the X10 language support in SDM.

The main features added are the following:

. X10 stack support:
  Provide X10 call stack entries for X10 application.
. Breakpoint support:
  Set breakpoints from X10 source.  Resume, and breakpoints will be hit.
. Step over, Step into and Step return support 
  Provide Step over, Step into and Step return support for stepping through X10 application.
. X10 variable support:
  Provide variable support in X10 domain, and filtering out internal C++ implementation details.
Comment 1 Xuan Chen CLA 2010-11-02 14:14:13 EDT
Created attachment 182227 [details]
code for X10 language support in SDM
Comment 2 Xuan Chen CLA 2010-11-12 11:06:19 EST
Created attachment 183008 [details]
Updated patch (based on current HEAD, and add some fixes

Attach the updated patch for x10 support.
Comment 3 Greg Watson CLA 2010-11-13 13:42:53 EST
Thanks for the patch. The following issues will need to be addressed before I can commit this patch.

1. Some files contain non-EPL licenses or no licenses. All files must have the EPL license and no other license.
2. Function prototypes in header files should be declared external.
3. The naming convention for exported multi-word function and type names is to capitalize the first letter of each word (e.g. X10SourceFile). Words in type names only can also be separated by underscores, but in this case the first letter of each should not be capitalized.
4. The naming convention for structure fields is to separate words with an underscore. No capitalization should be used.
5. A leading underscore should only be used for internal/static identifiers or identifiers used only within a single file, not in field names or exported identifiers.
6. Function declarations should have the type on a line by itself, followed by the function name and arguments, followed by the curly brace.
7. The curly brace for "if", "for", etc. statements should be on the same line as the keyword.
8. All functions should be declared static unless explicitly exported with an 'extern' prototype in the header file.
9. File names should separate words with underscores and not capitalized words.
10. Functions should be documented.
11. I don't understand the addition of the gdb_level field to the stackframe structure. This field is never set to anything other than the same value as level. Also, in X10GDBMISetCurrentStackframe, the value of the gdb_level variable is never used.
12. The X10MetaDebugInfoMap.c file should be moved to the utils directory (with appropriate name change).

See http://wiki.eclipse.org/PTP/policy/developer_guidelines#Additional_requirements_for_C_source for more details on formatting and naming conventions.
Comment 4 Greg Watson CLA 2010-11-13 14:01:10 EST
I've committed the libmi changes.
Comment 5 Xuan Chen CLA 2010-11-17 17:10:26 EST
Created attachment 183359 [details]
Updated according to Greg's comment.  Thanks.

I updated the patch according to Greg's comment.

Regarding to the question for the addition of gdb_level for statckframe:
For X10 application, we need to do stack filtering to show only X10 related stack frames.  For example, in C++ domain, there are 14 stack frame.  But for X10, there are only 2.  So level will be used to represent level of stack frame in X10 domain.  But we still need to keep its corresponding level in C++ domain in gdb_level field since it will be used when submitting "-stack-select-frame" for SetCurrentStackframe request from the client.

It should not affect other languages since level will never be set to other value than it corresponding gdb_level value.

Thanks.
Comment 6 Xuan Chen CLA 2010-11-18 12:39:09 EST
Created attachment 183406 [details]
Updated patch (removed some tryout code)

I accidentally included some tryout code in previous patch.  I removed it here.  Thanks.
Comment 7 Greg Watson CLA 2010-11-29 14:54:11 EST
Committed to HEAD. I separated the code into separate directories and made it an option to configure (enabled by default). Please check that it works for you and reopen the bug if you have problems.
Comment 8 Xuan Chen CLA 2010-11-30 15:33:57 EST
Tested out using latest sdm code, and the x10 support works fine.

Thanks!
Comment 9 Xuan Chen CLA 2010-11-30 15:34:45 EST
Closing.