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)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dmandelin, Assigned: benjamin)
Details
Attachments
(2 files)
|
3.09 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.72 KB,
patch
|
Details | Diff | Splinter Review |
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.
Comment 1•17 years ago
|
||
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?
| Reporter | ||
Comment 2•17 years ago
|
||
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?
| Reporter | ||
Comment 3•17 years ago
|
||
I went with the name 'args' and ';' as the separator. I added a test case for the args.
| Assignee | ||
Comment 4•17 years ago
|
||
| Assignee | ||
Comment 5•17 years ago
|
||
Pushed with a change recommeded by dmandelin.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•17 years ago
|
Attachment #317584 -
Flags: review?(dmandelin)
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•