Closed Bug 428053 Opened 17 years ago Closed 17 years ago

Dehydra/Treehydra: pass strings from command line to JS

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmandelin, Assigned: benjamin)

Details

Attachments

(2 files)

It would be nice if it were possible to pass control strings from the g++ command line through to JS, e.g., to run scripts in normal mode, test mode, or debug mode. Or to run an analysis on only selected functions in the C++ file. We talked about this earlier, and I think Taras suggested it would go in the plugin-arg: g++ -fplugin-arg=gcc_treehydra.so,arbitrarystuff We also need an API for exposing it to JS. A property on the global object seems like the natural choice, but what about the name? It's just one string, so "arg" seems like a decent name.
I don't really like arg, but I don't have a better suggestion. Just wanted to mention that g++ -fplugin-arg=gcc_treehydra.so,arbitrarystuff,boo should end up as arg=arbitrarystuff,boo Also, are we happy with, as a separator instead of ; or something?
I hesitated myself on arg, but I couldn't come up with anything better. Agree with your clarification. I chose ',' because it doesn't require any shell quoting. But now I realize that if you want to have a function decl as one part of the arg string, it would get more annoying to have additional parts. So ';' may be a better choice. Other thoughts?
Attached patch Proposed patchSplinter Review
I went with the name 'args' and ';' as the separator. I added a test case for the args.
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #317584 - Flags: review?(dmandelin)
Pushed with a change recommeded by dmandelin.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #317584 - Flags: review?(dmandelin)
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: