Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325021

Summary: Cryptic parser error when inserting a space in Hwi fxn name
Product: [Technology] RTSC Reporter: David Friedland <dfriedland>
Component: ToolsAssignee: Branavan Karunamoorthy <b-karunamoorthy>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: targets: 3.25.00

Description David Friedland CLA 2010-09-10 20:18:31 EDT
Build Identifier: RTSC/XDCTools 3.20.01.42-eng

If a space character is placed in a Hwi function name, the error output looks like:

"package/cfg/tilt1_configuration_p430.c", line 1398: error: expected an identifier
"package/cfg/tilt1_configuration_p430.c", line 1402: error: expected a "("

which doesn't help the user much in figuring out what is wrong.

Reproducible: Always

Steps to Reproduce:
1. Create a valid Hwi instance.
2. Insert a space character within the hwiFxn name.
3. Build
Comment 1 Dave Russo CLA 2011-11-25 21:08:51 EST
We need to do a check when and xdc.services.intern.xsr.Extern is created with a name containing spaces.

This can't happen during a parse of .xdc files, so it should be sufficient to validate when handling assignments of the form "&..." to pointer types (in Proto.Adr).
Comment 2 Dave Russo CLA 2011-11-25 22:37:07 EST
fixed by adding a check when "&..." assignments are made.
Comment 3 Dave Russo CLA 2011-11-29 16:18:40 EST
added test $TREES/xdctest/xdctest-b06/ecl/ecl325021 for this fix.
Comment 4 David Friedland CLA 2012-02-07 22:53:14 EST
OK, I think its worse -- because now its more anomalous.

Steps to Reproduce:
1. Create a valid Hwi instance.
2. Insert a space character within the hwiFxn name.
3. Save the configuration

The Hwi instance will no longer appear in the Outline View window.
Comment 5 Dave Russo CLA 2012-03-21 13:10:55 EDT
Since we should be checking the sanity of assignments in the underlying tool (so we can properly trap bogus identifiers, we need to fix xgconf to properly handle the situation were this error occurs.

Once xgconf can handle the error we can restore the fix previously made.
Comment 6 Branavan Karunamoorthy CLA 2013-02-20 17:44:12 EST
When a users enters a new function name value for a model node, I added a check to verify the function name is valid and does not contain spaces. If it is not valid an error is logged and an error message pops up. The new value is not applied.
Comment 7 Branavan Karunamoorthy CLA 2013-02-20 17:44:36 EST
Fixed
Comment 8 Branavan Karunamoorthy CLA 2013-02-26 13:37:51 EST
Fix has been checked into xdcconfig-l branch.
Comment 9 David Friedland CLA 2013-03-04 18:08:33 EST
Verified in CCS 5.4.0.40 and SYS/BIOS 6.35.0.20 that an error dialog box is raised when I attempt to enter a Hwi function name that has a space character in it.