mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
32x: drc: new debug facility (pdb). Few fixes thanks to it.
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@863 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
9cfdd2d2e9
commit
82d64b3a5f
5 changed files with 24 additions and 6 deletions
|
@ -7,6 +7,17 @@ endif
|
||||||
ifeq "$(profile)" "2"
|
ifeq "$(profile)" "2"
|
||||||
CFLAGS += -fprofile-use
|
CFLAGS += -fprofile-use
|
||||||
endif
|
endif
|
||||||
|
ifeq "$(pdb)" "1"
|
||||||
|
DEFINES += PDB
|
||||||
|
OBJS += cpu/debug.o
|
||||||
|
ifeq "$(pdb_net)" "1"
|
||||||
|
DEFINES += PDB_NET
|
||||||
|
endif
|
||||||
|
ifeq "$(readline)" "1"
|
||||||
|
DEFINES += HAVE_READLINE
|
||||||
|
LDFLAGS += -lreadline
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifeq "$(pprof)" "1"
|
ifeq "$(pprof)" "1"
|
||||||
DEFINES += PPROF
|
DEFINES += PPROF
|
||||||
OBJS += platform/linux/pprof.o
|
OBJS += platform/linux/pprof.o
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "plat.h"
|
#include "plat.h"
|
||||||
|
#include <cpu/debug.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +35,12 @@ void parse_cmd_line(int argc, char *argv[])
|
||||||
else if (strcasecmp(argv[x], "-loadstate") == 0) {
|
else if (strcasecmp(argv[x], "-loadstate") == 0) {
|
||||||
if (x+1 < argc) { ++x; load_state_slot = atoi(argv[x]); }
|
if (x+1 < argc) { ++x; load_state_slot = atoi(argv[x]); }
|
||||||
}
|
}
|
||||||
|
else if (strcasecmp(argv[x], "-pdb") == 0) {
|
||||||
|
if (x+1 < argc) { ++x; pdb_command(argv[x]); }
|
||||||
|
}
|
||||||
|
else if (strcasecmp(argv[x], "-pdb_connect") == 0) {
|
||||||
|
if (x+2 < argc) { pdb_net_connect(argv[x+1], argv[x+2]); x += 2; }
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
unrecognized = 1;
|
unrecognized = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -12,6 +12,8 @@ use_sh2drc = 1
|
||||||
#drc_debug_interp = 1
|
#drc_debug_interp = 1
|
||||||
#profile = 1
|
#profile = 1
|
||||||
|
|
||||||
|
all: mkdirs PicoDrive
|
||||||
|
|
||||||
-include Makefile.local
|
-include Makefile.local
|
||||||
|
|
||||||
ifndef ARCH
|
ifndef ARCH
|
||||||
|
@ -27,7 +29,7 @@ CFLAGS += -mcpu=arm920t
|
||||||
DEFINES += ARM
|
DEFINES += ARM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = $(CROSS)gcc
|
CC ?= $(CROSS)gcc
|
||||||
|
|
||||||
# frontend
|
# frontend
|
||||||
OBJS += io.o emu.o blit.o in_evdev.o plat.o sndout_oss.o log_io.o
|
OBJS += io.o emu.o blit.o in_evdev.o plat.o sndout_oss.o log_io.o
|
||||||
|
@ -70,8 +72,6 @@ vpath %.asm = ../..
|
||||||
|
|
||||||
DIRS += platform/linux zlib unzip
|
DIRS += platform/linux zlib unzip
|
||||||
|
|
||||||
all: mkdirs PicoDrive
|
|
||||||
|
|
||||||
include ../common/common.mak
|
include ../common/common.mak
|
||||||
include ../common/revision.mak
|
include ../common/revision.mak
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ void host_dasm(void *addr, int len)
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
printf("%s:\n", name);
|
printf("%s:\n", name);
|
||||||
|
|
||||||
printf(" %08lx ", (long)vma);
|
printf(" %08lx ", (long)vma);
|
||||||
vma += print_insn_func(vma, &di);
|
vma += print_insn_func(vma, &di);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#define SIMPLE_WRITE_SOUND 0
|
#define SIMPLE_WRITE_SOUND 0
|
||||||
#define mix_32_to_16l_stereo_lvl mix_32_to_16l_stereo
|
#define mix_32_to_16l_stereo_lvl mix_32_to_16l_stereo
|
||||||
|
|
||||||
#define EL_LOGMASK (EL_STATUS|EL_ANOMALY|EL_UIO|EL_IDLE)
|
#define EL_LOGMASK (EL_STATUS|EL_ANOMALY|EL_UIO)
|
||||||
// EL_VDPDMA|EL_ASVDP|EL_SR | EL_BUSREQ|EL_Z80BNK | EL_32X)
|
// EL_VDPDMA|EL_ASVDP|EL_SR | EL_IDLE | EL_BUSREQ|EL_Z80BNK | EL_32X)
|
||||||
|
|
||||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||||
#define dprintf(x...)
|
#define dprintf(x...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue