forked from Imagelibrary/binutils-gdb
sim: callback: expose argv & environ
Pass the existing strings data to the callbacks so that common libgloss syscalls can be implemented (which we'll do shortly).
This commit is contained in:
@@ -884,6 +884,7 @@ sim_create_inferior (SIM_DESC sd,
|
||||
{
|
||||
uint32_t addr;
|
||||
sim_cpu *cpu = STATE_CPU (sd, 0);
|
||||
host_callback *cb = STATE_CALLBACK (sd);
|
||||
|
||||
/* Set the PC. */
|
||||
if (abfd != NULL)
|
||||
@@ -907,6 +908,9 @@ sim_create_inferior (SIM_DESC sd,
|
||||
STATE_PROG_ENVP (sd) = dupargv (env);
|
||||
}
|
||||
|
||||
cb->argv = STATE_PROG_ARGV (sd);
|
||||
cb->envp = STATE_PROG_ENVP (sd);
|
||||
|
||||
cpu->state.regs[FT32_HARD_SP] = addr;
|
||||
cpu->state.num_i = 0;
|
||||
cpu->state.cycles = 0;
|
||||
|
||||
Reference in New Issue
Block a user