File: debug.h

package info (click to toggle)
libretro-snes9x 1.63%2Bdfsg-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 8,972 kB
  • sloc: cpp: 86,293; ansic: 6,630; sh: 3,237; makefile: 637
file content (41 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*****************************************************************************\
     Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
                This file is licensed under the Snes9x License.
   For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/

#ifdef DEBUGGER

#ifndef _DEBUG_H_
#define _DEBUG_H_

#include <string>

struct SBreakPoint
{
	bool8	Enabled;
	uint8	Bank;
	uint16	Address;
};

#define ENSURE_TRACE_OPEN(fp, file, mode) \
	if (!fp) \
	{ \
		std::string fn = S9xGetDirectory(LOG_DIR); \
		fn += SLASH_STR file; \
		fp = fopen(fn.c_str(), mode); \
	}

extern struct SBreakPoint	S9xBreakpoint[6];

void S9xDoDebug (void);
void S9xTrace (void);
void S9xSA1Trace (void);
void S9xTraceMessage (const char *);
void S9xTraceFormattedMessage (const char *, ...);
void S9xPrintHVPosition (char *);
void S9xDebugProcessCommand(char *);

#endif

#endif