Skip to content

Commit

Permalink
run 구현 진행중
Browse files Browse the repository at this point in the history
  • Loading branch information
limdongjin committed May 2, 2019
1 parent b367672 commit cc4fd3e
Show file tree
Hide file tree
Showing 5 changed files with 622 additions and 14 deletions.
16 changes: 10 additions & 6 deletions command_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,14 @@ shell_status execute_run(State *state_store){
printf("run_count: %d\n",state_store->debugger_state->run_count);
printf("previous_bp: %04X\n", state_store->debugger_state->previous_bp);
printf("====DEBUG=========\n");
bool status;

Debugger* debugger = state_store->debugger_state;
if(!state_store->debugger_state->is_running){
state_store->debugger_state->registers->PC = state_store->debugger_state->start_address;
}

status = run(state_store->debugger_state, state_store->memories_state);
if(!status) return EXECUTE_FAIL;

return EXECUTE_SUCCESS;
}
Expand Down Expand Up @@ -349,18 +354,17 @@ shell_status execute_bp_clear(State *state_store){
* loader 명령어
*/
shell_status execute_loader(Command *user_command, State *state_store) {
printf("loader_linker execute\n");

// printf("loader_linker execute\n");
bool status;
for(int i = 0; i < 3; i++)
state_store->debugger_state->filenames[i] = NULL;

for(size_t i= 1; i < user_command->token_cnt; i++)
state_store->debugger_state->filenames[i - 1] = user_command->tokens[i];

state_store->debugger_state->file_count = user_command->token_cnt - 1;

if(!loader_linker(state_store->debugger_state, state_store->memories_state))
return EXECUTE_FAIL;
status = loader_linker(state_store->debugger_state, state_store->memories_state);
if(!status) return EXECUTE_FAIL;

state_store->debugger_state->run_count = 0;
state_store->debugger_state->previous_bp = -1;
Expand Down
Loading

0 comments on commit cc4fd3e

Please sign in to comment.