2 * Simulator of microcontrollers (cmd.src/info.cc)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
39 * INFO BREAKPOINTS command
43 cl_info_bp_cmd::do_work(class cl_sim *sim,
44 class cl_cmdline *cmdline, class cl_console *con)
49 con->printf("Num Type Disp Hit Cnt Address What\n");
50 for (i= 0; i < sim->uc->fbrk->count; i++)
52 class cl_brk *fb= (class cl_brk *)(sim->uc->fbrk->at(i));
53 s= sim->uc->disass(fb->addr, NULL);
54 con->printf("%-3d %-10s %s %-5d %-5d 0x%06x %s\n", fb->nr,
55 "fetch", (fb->perm==brkFIX)?"keep":"del ",
60 for (i= 0; i < sim->uc->ebrk->count; i++)
62 class cl_ev_brk *eb= (class cl_ev_brk *)(sim->uc->ebrk->at(i));
63 con->printf("%-3d %-10s %s %-5d %-5d 0x%06x %s\n", eb->nr,
64 "event", (eb->perm==brkFIX)?"keep":"del ",
69 class cl_rom *r= (class cl_rom *)(sim->uc->mem(MEM_ROM));
70 for (a= 0; a < sim->uc->get_mem_size(MEM_ROM); a++)
72 if (r->bp_map->get(a))
73 con->printf("0x%06x\n", a);
80 * INFO REGISTERS command
84 cl_info_reg_cmd::do_work(class cl_sim *sim,
85 class cl_cmdline *cmdline, class cl_console *con)
87 sim->uc->print_regs(con);
97 cl_info_hw_cmd::do_work(class cl_sim *sim,
98 class cl_cmdline *cmdline, class cl_console *con)
101 class cl_cmd_arg *params[4]= { cmdline->param(0),
106 if (cmdline->syntax_match(sim, HW)) {
107 hw= params[0]->value.hw;
111 con->printf("%s\n", short_help?short_help:"Error: wrong syntax\n");
117 /* End of cmd.src/info.cc */