remove debugger command for disasm constant hex print mode, was not used and new disasm doesn't support it

This commit is contained in:
Stanislav Shwartsman 2021-01-02 12:12:02 +00:00
parent 2f3adf849c
commit a8e066ede7
7 changed files with 1931 additions and 1976 deletions

View File

@ -30,8 +30,6 @@ extern "C" {
#if BX_DEBUGGER
#include "disasm/disasm.h"
#define LOG_THIS genlog->
#if HAVE_LIBREADLINE
@ -120,6 +118,7 @@ static struct {
} bx_dbg_batch_dma;
// some buffers for disassembly
#include "disasm/disasm.h"
static disassembler bx_disassemble;
static bx_bool bx_disassemble_syntax_intel = 1;
static Bit8u bx_disasm_ibuf[32];
@ -2257,11 +2256,6 @@ void bx_dbg_disassemble_switch_mode()
bx_disassemble_syntax_intel = !bx_disassemble_syntax_intel;
}
void bx_dbg_disassemble_hex_mode_switch(int mode)
{
bx_disassemble.set_offset_mode_hex(mode);
}
void bx_dbg_take_command(const char *what, unsigned n)
{
if (! strcmp(what, "smi")) {

View File

@ -121,7 +121,6 @@ void bx_dbg_continue_command(bx_bool expression);
void bx_dbg_stepN_command(int cpu, Bit32u count);
void bx_dbg_set_auto_disassemble(bx_bool enable);
void bx_dbg_disassemble_switch_mode(void);
void bx_dbg_disassemble_hex_mode_switch(int mode);
void bx_dbg_set_disassemble_size(unsigned size);
void bx_dbg_del_breakpoint_command(unsigned handle);
void bx_dbg_en_dis_breakpoint_command(unsigned handle, bx_bool enable);

File diff suppressed because it is too large Load Diff

View File

@ -123,7 +123,6 @@ nmi { bxlval.sval = strdup(bxtext); return(BX_TOKEN_NMI); }
tlb { bxlval.sval = strdup(bxtext); return(BX_TOKEN_TLB); }
u |
disasm { BEGIN(DISASM); bxlval.sval = strdup(bxtext); return(BX_TOKEN_DISASM); }
hex { bxlval.sval = strdup(bxtext); return(BX_TOKEN_HEX); }
instrument { bxlval.sval = strdup(bxtext); return(BX_TOKEN_INSTRUMENT); }
stop { bxlval.sval = strdup(bxtext); return(BX_TOKEN_STOP); }
doit { bxlval.sval = strdup(bxtext); return(BX_TOKEN_DOIT); }

File diff suppressed because it is too large Load Diff

View File

@ -110,56 +110,55 @@ extern int bxdebug;
BX_TOKEN_SMI = 320,
BX_TOKEN_NMI = 321,
BX_TOKEN_TLB = 322,
BX_TOKEN_HEX = 323,
BX_TOKEN_DISASM = 324,
BX_TOKEN_INSTRUMENT = 325,
BX_TOKEN_STRING = 326,
BX_TOKEN_STOP = 327,
BX_TOKEN_DOIT = 328,
BX_TOKEN_CRC = 329,
BX_TOKEN_TRACE = 330,
BX_TOKEN_TRACEREG = 331,
BX_TOKEN_TRACEMEM = 332,
BX_TOKEN_SWITCH_MODE = 333,
BX_TOKEN_SIZE = 334,
BX_TOKEN_PTIME = 335,
BX_TOKEN_TIMEBP_ABSOLUTE = 336,
BX_TOKEN_TIMEBP = 337,
BX_TOKEN_MODEBP = 338,
BX_TOKEN_VMEXITBP = 339,
BX_TOKEN_PRINT_STACK = 340,
BX_TOKEN_BT = 341,
BX_TOKEN_WATCH = 342,
BX_TOKEN_UNWATCH = 343,
BX_TOKEN_READ = 344,
BX_TOKEN_WRITE = 345,
BX_TOKEN_SHOW = 346,
BX_TOKEN_LOAD_SYMBOLS = 347,
BX_TOKEN_SYMBOLS = 348,
BX_TOKEN_LIST_SYMBOLS = 349,
BX_TOKEN_GLOBAL = 350,
BX_TOKEN_WHERE = 351,
BX_TOKEN_PRINT_STRING = 352,
BX_TOKEN_NUMERIC = 353,
BX_TOKEN_PAGE = 354,
BX_TOKEN_HELP = 355,
BX_TOKEN_XML = 356,
BX_TOKEN_CALC = 357,
BX_TOKEN_DEVICE = 358,
BX_TOKEN_GENERIC = 359,
BX_TOKEN_RSHIFT = 360,
BX_TOKEN_LSHIFT = 361,
BX_TOKEN_EQ = 362,
BX_TOKEN_NE = 363,
BX_TOKEN_LE = 364,
BX_TOKEN_GE = 365,
BX_TOKEN_REG_IP = 366,
BX_TOKEN_REG_EIP = 367,
BX_TOKEN_REG_RIP = 368,
BX_TOKEN_REG_SSP = 369,
NOT = 370,
NEG = 371,
INDIRECT = 372
BX_TOKEN_DISASM = 323,
BX_TOKEN_INSTRUMENT = 324,
BX_TOKEN_STRING = 325,
BX_TOKEN_STOP = 326,
BX_TOKEN_DOIT = 327,
BX_TOKEN_CRC = 328,
BX_TOKEN_TRACE = 329,
BX_TOKEN_TRACEREG = 330,
BX_TOKEN_TRACEMEM = 331,
BX_TOKEN_SWITCH_MODE = 332,
BX_TOKEN_SIZE = 333,
BX_TOKEN_PTIME = 334,
BX_TOKEN_TIMEBP_ABSOLUTE = 335,
BX_TOKEN_TIMEBP = 336,
BX_TOKEN_MODEBP = 337,
BX_TOKEN_VMEXITBP = 338,
BX_TOKEN_PRINT_STACK = 339,
BX_TOKEN_BT = 340,
BX_TOKEN_WATCH = 341,
BX_TOKEN_UNWATCH = 342,
BX_TOKEN_READ = 343,
BX_TOKEN_WRITE = 344,
BX_TOKEN_SHOW = 345,
BX_TOKEN_LOAD_SYMBOLS = 346,
BX_TOKEN_SYMBOLS = 347,
BX_TOKEN_LIST_SYMBOLS = 348,
BX_TOKEN_GLOBAL = 349,
BX_TOKEN_WHERE = 350,
BX_TOKEN_PRINT_STRING = 351,
BX_TOKEN_NUMERIC = 352,
BX_TOKEN_PAGE = 353,
BX_TOKEN_HELP = 354,
BX_TOKEN_XML = 355,
BX_TOKEN_CALC = 356,
BX_TOKEN_DEVICE = 357,
BX_TOKEN_GENERIC = 358,
BX_TOKEN_RSHIFT = 359,
BX_TOKEN_LSHIFT = 360,
BX_TOKEN_EQ = 361,
BX_TOKEN_NE = 362,
BX_TOKEN_LE = 363,
BX_TOKEN_GE = 364,
BX_TOKEN_REG_IP = 365,
BX_TOKEN_REG_EIP = 366,
BX_TOKEN_REG_RIP = 367,
BX_TOKEN_REG_SSP = 368,
NOT = 369,
NEG = 370,
INDIRECT = 371
};
#endif
/* Tokens. */
@ -228,56 +227,55 @@ extern int bxdebug;
#define BX_TOKEN_SMI 320
#define BX_TOKEN_NMI 321
#define BX_TOKEN_TLB 322
#define BX_TOKEN_HEX 323
#define BX_TOKEN_DISASM 324
#define BX_TOKEN_INSTRUMENT 325
#define BX_TOKEN_STRING 326
#define BX_TOKEN_STOP 327
#define BX_TOKEN_DOIT 328
#define BX_TOKEN_CRC 329
#define BX_TOKEN_TRACE 330
#define BX_TOKEN_TRACEREG 331
#define BX_TOKEN_TRACEMEM 332
#define BX_TOKEN_SWITCH_MODE 333
#define BX_TOKEN_SIZE 334
#define BX_TOKEN_PTIME 335
#define BX_TOKEN_TIMEBP_ABSOLUTE 336
#define BX_TOKEN_TIMEBP 337
#define BX_TOKEN_MODEBP 338
#define BX_TOKEN_VMEXITBP 339
#define BX_TOKEN_PRINT_STACK 340
#define BX_TOKEN_BT 341
#define BX_TOKEN_WATCH 342
#define BX_TOKEN_UNWATCH 343
#define BX_TOKEN_READ 344
#define BX_TOKEN_WRITE 345
#define BX_TOKEN_SHOW 346
#define BX_TOKEN_LOAD_SYMBOLS 347
#define BX_TOKEN_SYMBOLS 348
#define BX_TOKEN_LIST_SYMBOLS 349
#define BX_TOKEN_GLOBAL 350
#define BX_TOKEN_WHERE 351
#define BX_TOKEN_PRINT_STRING 352
#define BX_TOKEN_NUMERIC 353
#define BX_TOKEN_PAGE 354
#define BX_TOKEN_HELP 355
#define BX_TOKEN_XML 356
#define BX_TOKEN_CALC 357
#define BX_TOKEN_DEVICE 358
#define BX_TOKEN_GENERIC 359
#define BX_TOKEN_RSHIFT 360
#define BX_TOKEN_LSHIFT 361
#define BX_TOKEN_EQ 362
#define BX_TOKEN_NE 363
#define BX_TOKEN_LE 364
#define BX_TOKEN_GE 365
#define BX_TOKEN_REG_IP 366
#define BX_TOKEN_REG_EIP 367
#define BX_TOKEN_REG_RIP 368
#define BX_TOKEN_REG_SSP 369
#define NOT 370
#define NEG 371
#define INDIRECT 372
#define BX_TOKEN_DISASM 323
#define BX_TOKEN_INSTRUMENT 324
#define BX_TOKEN_STRING 325
#define BX_TOKEN_STOP 326
#define BX_TOKEN_DOIT 327
#define BX_TOKEN_CRC 328
#define BX_TOKEN_TRACE 329
#define BX_TOKEN_TRACEREG 330
#define BX_TOKEN_TRACEMEM 331
#define BX_TOKEN_SWITCH_MODE 332
#define BX_TOKEN_SIZE 333
#define BX_TOKEN_PTIME 334
#define BX_TOKEN_TIMEBP_ABSOLUTE 335
#define BX_TOKEN_TIMEBP 336
#define BX_TOKEN_MODEBP 337
#define BX_TOKEN_VMEXITBP 338
#define BX_TOKEN_PRINT_STACK 339
#define BX_TOKEN_BT 340
#define BX_TOKEN_WATCH 341
#define BX_TOKEN_UNWATCH 342
#define BX_TOKEN_READ 343
#define BX_TOKEN_WRITE 344
#define BX_TOKEN_SHOW 345
#define BX_TOKEN_LOAD_SYMBOLS 346
#define BX_TOKEN_SYMBOLS 347
#define BX_TOKEN_LIST_SYMBOLS 348
#define BX_TOKEN_GLOBAL 349
#define BX_TOKEN_WHERE 350
#define BX_TOKEN_PRINT_STRING 351
#define BX_TOKEN_NUMERIC 352
#define BX_TOKEN_PAGE 353
#define BX_TOKEN_HELP 354
#define BX_TOKEN_XML 355
#define BX_TOKEN_CALC 356
#define BX_TOKEN_DEVICE 357
#define BX_TOKEN_GENERIC 358
#define BX_TOKEN_RSHIFT 359
#define BX_TOKEN_LSHIFT 360
#define BX_TOKEN_EQ 361
#define BX_TOKEN_NE 362
#define BX_TOKEN_LE 363
#define BX_TOKEN_GE 364
#define BX_TOKEN_REG_IP 365
#define BX_TOKEN_REG_EIP 366
#define BX_TOKEN_REG_RIP 367
#define BX_TOKEN_REG_SSP 368
#define NOT 369
#define NEG 370
#define INDIRECT 371
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@ -290,7 +288,7 @@ union YYSTYPE
Bit64u uval;
bx_bool bval;
#line 294 "y.tab.h" /* yacc.c:1909 */
#line 292 "y.tab.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;

View File

@ -87,7 +87,6 @@ Bit64u eval_value;
%token <sval> BX_TOKEN_SMI
%token <sval> BX_TOKEN_NMI
%token <sval> BX_TOKEN_TLB
%token <sval> BX_TOKEN_HEX
%token <sval> BX_TOKEN_DISASM
%token <sval> BX_TOKEN_INSTRUMENT
%token <sval> BX_TOKEN_STRING
@ -956,11 +955,6 @@ disassemble_command:
bx_dbg_disassemble_switch_mode();
free($1); free($2);
}
| BX_TOKEN_DISASM BX_TOKEN_HEX BX_TOKEN_TOGGLE_ON_OFF '\n'
{
bx_dbg_disassemble_hex_mode_switch($3);
free($1); free($2);
}
| BX_TOKEN_DISASM BX_TOKEN_SIZE '=' BX_TOKEN_NUMERIC '\n'
{
bx_dbg_set_disassemble_size($4);