-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support passing argc and argv to target program #185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve the concerns raised by CodeQL.
- half close #150, I left envp in TODO - refactor parse_args function with getopt to support short option which looks cleaner and replace all long option with short option - update README
In file |
If we are running emulator on 64-bit machine, the virtual address would be 64-bit unless it is compile with -m32 option. Since we are RV32 emulator, so the address space should be < 4GB, from this point we cannot directly access 64-bit address from emulator. Thus, first call of |
Ok, but I still confuse. I guess these two copies are for different purposes. Could you explain the different purpose between store the argc and argv to < 4GB address and |
For example, we want access the args[0], the instruction might look like this: |
Does you mean the instruction |
yes |
I think I have solved it. |
I defer to @qwe661234 for confirmation. |
Thank @ChinYikMing for contributing! |
Half close #150, I left envp in TODO
I assumed all emulator's option are passed before the target program and its args thus I modify the parse_args function consequently