Ignore:
Timestamp:
Jul 9, 2020, 8:51:43 AM (4 years ago)
Author:
coas-nagasima
Message:

mrubyを2.1.1に更新

Location:
EcnlProtoTool/trunk/mruby-2.1.1
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/mruby-2.1.1/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c

    r331 r439  
    66#include <stdlib.h>
    77#include <string.h>
    8 #include <stdio.h>
    98#include <ctype.h>
    109
     
    5352  {"help",      NULL,           1, 0, 1, DBGCMD_HELP,           dbgcmd_help},            /* h[elp] */
    5453  {"info",      "breakpoints",  1, 1, 1, DBGCMD_INFO_BREAK,     dbgcmd_info_break},      /* i[nfo] b[reakpoints] */
     54  {"info",      "locals",       1, 1, 0, DBGCMD_INFO_LOCAL,     dbgcmd_info_local},      /* i[nfo] l[ocals] */
    5555  {"list",      NULL,           1, 0, 1, DBGCMD_LIST,           dbgcmd_list},            /* l[ist] */
    5656  {"print",     NULL,           1, 0, 0, DBGCMD_PRINT,          dbgcmd_print},           /* p[rint] */
     
    185185mrb_debug_context_new(mrb_state *mrb)
    186186{
    187   mrb_debug_context *dbg = mrb_malloc(mrb, sizeof(mrb_debug_context));
     187  mrb_debug_context *dbg = (mrb_debug_context*)mrb_malloc(mrb, sizeof(mrb_debug_context));
    188188
    189189  memset(dbg, 0, sizeof(mrb_debug_context));
     
    224224mrdb_state_new(mrb_state *mrb)
    225225{
    226   mrdb_state *mrdb = mrb_malloc(mrb, sizeof(mrdb_state));
     226  mrdb_state *mrdb = (mrdb_state*)mrb_malloc(mrb, sizeof(mrdb_state));
    227227
    228228  memset(mrdb, 0, sizeof(mrdb_state));
    229229
    230230  mrdb->dbg = mrb_debug_context_get(mrb);
    231   mrdb->command = mrb_malloc(mrb, MAX_COMMAND_LINE+1);
     231  mrdb->command = (char*)mrb_malloc(mrb, MAX_COMMAND_LINE+1);
    232232  mrdb->print_no = 1;
    233233
     
    505505
    506506static int32_t
    507 check_method_breakpoint(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
     507check_method_breakpoint(mrb_state *mrb, mrb_irep *irep, const mrb_code *pc, mrb_value *regs)
    508508{
    509509  struct RClass* c;
     
    511511  int32_t bpno;
    512512  mrb_bool isCfunc;
     513  struct mrb_insn_data insn;
    513514
    514515  mrb_debug_context *dbg = mrb_debug_context_get(mrb);
     
    518519  dbg->method_bpno = 0;
    519520
    520   switch(GET_OPCODE(*pc)) {
     521  insn = mrb_decode_insn(pc);
     522  switch(insn.insn) {
    521523    case OP_SEND:
    522524    case OP_SENDB:
    523       c = mrb_class(mrb, regs[GETARG_A(*pc)]);
    524       sym = irep->syms[GETARG_B(*pc)];
     525      c = mrb_class(mrb, regs[insn.a]);
     526      sym = irep->syms[insn.b];
    525527      break;
    526528    case OP_SUPER:
     
    544546
    545547static void
    546 mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, mrb_code *pc, mrb_value *regs)
     548mrb_code_fetch_hook(mrb_state *mrb, mrb_irep *irep, const mrb_code *pc, mrb_value *regs)
    547549{
    548550  const char *file;
     
    567569  }
    568570
    569   file = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
    570   line = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
     571  file = mrb_debug_get_filename(mrb, irep, pc - irep->iseq);
     572  line = mrb_debug_get_line(mrb, irep, pc - irep->iseq);
    571573
    572574  switch (dbg->xm) {
Note: See TracChangeset for help on using the changeset viewer.