Community
Participate
Working Groups
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.
Created attachment 182227 [details] code for X10 language support in SDM
Created attachment 183008 [details] Updated patch (based on current HEAD, and add some fixes Attach the updated patch for x10 support.
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.
I've committed the libmi changes.
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.
Created attachment 183406 [details] Updated patch (removed some tryout code) I accidentally included some tryout code in previous patch. I removed it here. Thanks.
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.
Tested out using latest sdm code, and the x10 support works fine. Thanks!
Closing.