Hi Gogineni,
If you REALLY CAN'T modify the app, I would then replace the file(s) your app
opens with a symlink to the file you want to open.
And if you feel in a hacky mood, you can dive in src/sim/syscall_emul.hh and
hardcode path override in openatFunc. Needless to say this is a terrible
Hello mohit,
But my problem is we shouldn't modify the program binary, instead when the
simulator process the binary, when it triggers fopen syscall, it should
should open a different file instead of already specified one. Here, as
this is in the hardware level, I guess we can't see the filename
Hi gogineni,
You will have to modify the hello world program to take in a command line
argument and use that instead of hard coded file name. Something like this
fp = fopen( argv[1] , "w" );
In gem5, if your se.py equivalent system is using the default set of command
line parameters defined
On Wed, Jul 21, 2021, 11:48 AM gogineni kailashnath <
gkailashnath1...@gmail.com> wrote:
> Hello,
>
> I have a C code, which creates a file *file.txt* and prints the hello
> world content in the file.
>
> #include
>
> int main () {
>FILE *fp;
>char str[] = "Hello world";
>
>