> [bernhard - Do 20. Okt 2005, 13:35:43]:
> 
> When running 'make test' the command 
> 
>    ./parrot -o examples/pasm/hello.o examples/pasm/hello.pbc 
> 
> fails to create examples/pasm/hello.o. Instead a file with the name
> 'exex_output.o' is generated. It looks like the name of the output file
> is expected to be in  REG_STR(0), but isn't. So the default file
> 'exec_output.o' is used. Sell line 116 of src/exec.c.
Hi,

I've traced this some more. It looks like the 'output' is stored in the
'0' STRING register of the initial interpreter context. This is done be
calling 'Parrot_setup_opt()'. However when this information is needed, I
assume the register has been cleared or stored in a not current context.
I've traced this only to the first VTABLE_invoke call of runops_args()
in src/inter_runs.c,line 157.

Using registers for passing command line options to a specific runcore
seem hazardous to me. Especially as a 'char *' is put where a 'STRING *'
is expected. 

As Parrot_setup_args() is so far only used for passing 'output' to the
exec runcore, I propose a quick fix.

i. Do not use STRING register for passing options
ii. Move interp->imc_info->output to interp->output_file and use
interp->output_file for all uses of the 'output' option.

Any comments?

> Whem copying 'exec_output.o' to 'examples/pasm/hello.o' manually, then
> 'make test' produces 'examples/pasm/hello'. However when trying to
> execute that executable, I get a segmentation fault.
I have no idea about this.
 
CU, Bernhard  

-- 
/* [EMAIL PROTECTED] */

Reply via email to