Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

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

Legend:

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

    r321 r331  
    66#include <ctype.h>
    77#include <string.h>
    8 #include "mruby.h"
    9 #include "mruby/dump.h"
    10 #include "mruby/debug.h"
    11 #include "mruby/string.h"
     8#include <mruby.h>
     9#include <mruby/dump.h>
     10#include <mruby/debug.h>
     11#include <mruby/string.h>
    1212#include "mrdb.h"
    1313#include "mrdberror.h"
     
    7171  uint32_t l;
    7272
    73   if((*ps == '0')||(strlen(ps) >= BPNO_LETTER_NUM)) {
     73  if ((*ps == '0')||(strlen(ps) >= BPNO_LETTER_NUM)) {
    7474    return 0;
    7575  }
    7676
    77   while( !(ISBLANK(*ps)||ISCNTRL(*ps)) ) {
    78     if(!ISDIGIT(*ps)) {
     77  while (!(ISBLANK(*ps)||ISCNTRL(*ps))) {
     78    if (!ISDIGIT(*ps)) {
    7979      return 0;
    8080    }
     
    9191  int32_t ret = MRB_DEBUG_OK;
    9292
    93   if(mrdb->wcnt == 1) {
     93  if (mrdb->wcnt == 1) {
    9494    ret = func(mrb, mrdb->dbg);
    9595    print_api_common_error(ret);
     
    110110    ps = mrdb->words[i];
    111111    bpno = parse_breakpoint_no(ps);
    112     if(bpno == 0) {
     112    if (bpno == 0) {
    113113      printf(BREAK_ERR_MSG_INVALIDBPNO, ps);
    114114      break;
    115115    }
    116116    ret = func(mrb, mrdb->dbg, (uint32_t)bpno);
    117     if(ret == MRB_DEBUG_BREAK_INVALID_NO) {
     117    if (ret == MRB_DEBUG_BREAK_INVALID_NO) {
    118118      printf(BREAK_ERR_MSG_NOBPNO, bpno);
    119119    }
    120     else if(ret != MRB_DEBUG_OK) {
     120    else if (ret != MRB_DEBUG_OK) {
    121121      print_api_common_error(ret);
    122122    }
     
    129129  char* ps = args;
    130130
    131   if(ISBLANK(*ps)||ISCNTRL(*ps)) {
     131  if (ISBLANK(*ps)||ISCNTRL(*ps)) {
    132132    puts(BREAK_ERR_MSG_BLANK);
    133133    return MRB_DEBUG_BPTYPE_NONE;
    134134  }
    135135
    136   if(!ISDIGIT(*ps)) {
     136  if (!ISDIGIT(*ps)) {
    137137    return MRB_DEBUG_BPTYPE_METHOD;
    138138  }
    139139
    140   while( !(ISBLANK(*ps)||ISCNTRL(*ps)) ) {
    141     if(!ISDIGIT(*ps)) {
     140  while (!(ISBLANK(*ps)||ISCNTRL(*ps))) {
     141    if (!ISDIGIT(*ps)) {
    142142      printf(BREAK_ERR_MSG_INVALIDSTR, args);
    143143      return MRB_DEBUG_BPTYPE_NONE;
     
    146146  }
    147147
    148   if((*args == '0')||(strlen(args) >= LINENO_MAX_DIGIT)) {
     148  if ((*args == '0')||(strlen(args) >= LINENO_MAX_DIGIT)) {
    149149    puts(BREAK_ERR_MSG_RANGEOVER);
    150150    return MRB_DEBUG_BPTYPE_NONE;
     
    159159  const char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE};
    160160
    161   if(bp->type == MRB_DEBUG_BPTYPE_LINE) {
     161  if (bp->type == MRB_DEBUG_BPTYPE_LINE) {
    162162    printf(BREAK_INFO_MSG_LINEBREAK,
    163163      bp->bpno, enable_letter[bp->enable], bp->point.linepoint.file, bp->point.linepoint.lineno);
    164164  }
    165165  else {
    166     if(bp->point.methodpoint.class_name == NULL) {
     166    if (bp->point.methodpoint.class_name == NULL) {
    167167      printf(BREAK_INFO_MSG_METHODBREAK_NOCLASS,
    168168        bp->bpno, enable_letter[bp->enable], bp->point.methodpoint.method_name);
     
    184184
    185185  bpnum = mrb_debug_get_breaknum(mrb, mrdb->dbg);
    186   if(bpnum < 0) {
     186  if (bpnum < 0) {
    187187    print_api_common_error(bpnum);
    188188    return;
    189189  }
    190   else if(bpnum == 0) {
     190  else if (bpnum == 0) {
    191191    puts(BREAK_ERR_MSG_NOBPNO_INFOALL);
    192192    return;
     
    195195
    196196  ret = mrb_debug_get_break_all(mrb, mrdb->dbg, (uint32_t)bpnum, bp_list);
    197   if(ret < 0) {
     197  if (ret < 0) {
    198198    print_api_common_error(ret);
    199199    return;
     
    220220    ps = mrdb->words[i];
    221221    bpno = parse_breakpoint_no(ps);
    222     if(bpno == 0) {
     222    if (bpno == 0) {
    223223      puts(BREAK_ERR_MSG_INVALIDBPNO_INFO);
    224224      break;
     
    226226
    227227    ret = mrb_debug_get_break(mrb, mrdb->dbg, bpno, &bp);
    228     if(ret == MRB_DEBUG_BREAK_INVALID_NO) {
     228    if (ret == MRB_DEBUG_BREAK_INVALID_NO) {
    229229      printf(BREAK_ERR_MSG_NOBPNO_INFO, bpno);
    230230      break;
    231231    }
    232     else if(ret != MRB_DEBUG_OK) {
     232    else if (ret != MRB_DEBUG_OK) {
    233233      print_api_common_error(ret);
    234234      break;
    235235    }
    236     else if(isFirst == TRUE) {
     236    else if (isFirst == TRUE) {
    237237      isFirst = FALSE;
    238238      puts(BREAK_INFO_MSG_HEADER);
     
    251251  uint32_t l;
    252252
    253   if(mrdb->wcnt <= 1) {
     253  if (mrdb->wcnt <= 1) {
    254254    puts(BREAK_ERR_MSG_BLANK);
    255255    return MRB_DEBUG_BPTYPE_NONE;
     
    257257
    258258  args = mrdb->words[1];
    259   if((body = strrchr(args, ':')) == NULL) {
     259  if ((body = strrchr(args, ':')) == NULL) {
    260260    body = args;
    261261    type = check_bptype(body);
    262   } else {
    263     if(body == args) {
     262  }
     263  else {
     264    if (body == args) {
    264265      printf(BREAK_ERR_MSG_INVALIDSTR, args);
    265266      return MRB_DEBUG_BPTYPE_NONE;
     
    272273    case MRB_DEBUG_BPTYPE_LINE:
    273274      STRTOUL(l, body);
    274       if( l <= 65535 ) {
     275      if (l <= 65535) {
    275276        *line = l;
    276277        *file = (body == args)? mrb_debug_get_filename(dbg->irep, (uint32_t)(dbg->pc - dbg->irep->iseq)): args;
    277       } else {
     278      }
     279      else {
    278280        puts(BREAK_ERR_MSG_RANGEOVER);
    279281        type = MRB_DEBUG_BPTYPE_NONE;
     
    281283      break;
    282284    case MRB_DEBUG_BPTYPE_METHOD:
    283       if(body == args) {
     285      if (body == args) {
    284286        /* method only */
    285         if( ISUPPER(*body)||ISLOWER(*body)||(*body == '_') ) {
     287        if (ISUPPER(*body)||ISLOWER(*body)||(*body == '_')) {
    286288          *method = body;
    287289          *cname = NULL;
    288         } else {
     290        }
     291        else {
    289292          printf(BREAK_ERR_MSG_INVALIDMETHOD, args);
    290293          type = MRB_DEBUG_BPTYPE_NONE;
    291294        }
    292       } else {
    293         if( ISUPPER(*args) ) {
     295      }
     296      else {
     297        if (ISUPPER(*args)) {
    294298          switch(*body) {
    295299            case '@': case '$': case '?': case '.': case ',': case ':':
     
    303307            break;
    304308          }
    305         } else {
     309        }
     310        else {
    306311          printf(BREAK_ERR_MSG_INVALIDCLASS, args);
    307312          type = MRB_DEBUG_BPTYPE_NONE;
     
    344349    if (type == MRB_DEBUG_BPTYPE_LINE) {
    345350      printf(BREAK_SET_MSG_LINE, ret, file, line);
    346     } else if ((type == MRB_DEBUG_BPTYPE_METHOD)&&(cname == NULL)) {
     351    }
     352    else if ((type == MRB_DEBUG_BPTYPE_METHOD)&&(cname == NULL)) {
    347353      printf(BREAK_SET_MSG_METHOD, ret, method);
    348     } else {
     354    }
     355    else {
    349356      printf(BREAK_SET_MSG_CLASS_METHOD, ret, cname, method);
    350357    }
    351   } else {
     358  }
     359  else {
    352360    switch (ret) {
    353361      case MRB_DEBUG_BREAK_INVALID_LINENO:
     
    380388dbgcmd_info_break(mrb_state *mrb, mrdb_state *mrdb)
    381389{
    382   if(mrdb->wcnt == 2) {
     390  if (mrdb->wcnt == 2) {
    383391    info_break_all(mrb, mrdb);
    384392  }
     
    396404
    397405  ret = exe_set_command_all(mrb, mrdb, mrb_debug_delete_break_all);
    398   if(ret != TRUE) {
     406  if (ret != TRUE) {
    399407    exe_set_command_select(mrb, mrdb, mrb_debug_delete_break);
    400408  }
     
    409417
    410418  ret = exe_set_command_all(mrb, mrdb, mrb_debug_enable_break_all);
    411   if(ret != TRUE) {
     419  if (ret != TRUE) {
    412420    exe_set_command_select(mrb, mrdb, mrb_debug_enable_break);
    413421  }
     
    422430
    423431  ret = exe_set_command_all(mrb, mrdb, mrb_debug_disable_break_all);
    424   if(ret != TRUE) {
     432  if (ret != TRUE) {
    425433    exe_set_command_select(mrb, mrdb, mrb_debug_disable_break);
    426434  }
Note: See TracChangeset for help on using the changeset viewer.