aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-05-26 13:48:29 +0200
committerWillem Jan Palenstijn2017-06-10 21:32:35 +0200
commitcb69d10e962e2cea604175fdd35189726f6a6436 (patch)
tree4aba600ca9937f22e0d99c4eb9f7d489e190b667
parent6d143e6da3e972fcf69c73028db702e89c53e278 (diff)
downloadscummvm-rg350-cb69d10e962e2cea604175fdd35189726f6a6436.tar.gz
scummvm-rg350-cb69d10e962e2cea604175fdd35189726f6a6436.tar.bz2
scummvm-rg350-cb69d10e962e2cea604175fdd35189726f6a6436.zip
SCI: Add underscores to Breakpoint member variables
-rw-r--r--engines/sci/console.cpp34
-rw-r--r--engines/sci/debug.h8
-rw-r--r--engines/sci/engine/scriptdebug.cpp10
3 files changed, 26 insertions, 26 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index ec54642b8a..2274dac1a7 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3729,22 +3729,22 @@ bool Console::cmdBreakpointList(int argc, const char **argv) {
Common::List<Breakpoint>::const_iterator end = _debugState._breakpoints.end();
for (; bp != end; ++bp) {
debugPrintf(" #%i: ", i);
- switch (bp->type) {
+ switch (bp->_type) {
case BREAK_SELECTOREXEC:
- debugPrintf("Execute %s\n", bp->name.c_str());
+ debugPrintf("Execute %s\n", bp->_name.c_str());
break;
case BREAK_SELECTORREAD:
- debugPrintf("Read %s\n", bp->name.c_str());
+ debugPrintf("Read %s\n", bp->_name.c_str());
break;
case BREAK_SELECTORWRITE:
- debugPrintf("Write %s\n", bp->name.c_str());
+ debugPrintf("Write %s\n", bp->_name.c_str());
break;
case BREAK_EXPORT:
- bpdata = bp->address;
+ bpdata = bp->_address;
debugPrintf("Execute script %d, export %d\n", bpdata >> 16, bpdata & 0xFFFF);
break;
case BREAK_ADDRESS:
- debugPrintf("Execute address %04x:%04x\n", PRINT_REG(bp->regAddress));
+ debugPrintf("Execute address %04x:%04x\n", PRINT_REG(bp->_regAddress));
}
i++;
@@ -3790,7 +3790,7 @@ bool Console::cmdBreakpointDelete(int argc, const char **argv) {
// Update EngineState::_activeBreakpointTypes.
int type = 0;
for (bp = _debugState._breakpoints.begin(); bp != end; ++bp) {
- type |= bp->type;
+ type |= bp->_type;
}
_debugState._activeBreakpointTypes = type;
@@ -3812,8 +3812,8 @@ bool Console::cmdBreakpointMethod(int argc, const char **argv) {
Thus, we can't check whether the command argument is a valid method name.
A breakpoint set on an invalid method name will just never trigger. */
Breakpoint bp;
- bp.type = BREAK_SELECTOREXEC;
- bp.name = argv[1];
+ bp._type = BREAK_SELECTOREXEC;
+ bp._name = argv[1];
_debugState._breakpoints.push_back(bp);
_debugState._activeBreakpointTypes |= BREAK_SELECTOREXEC;
@@ -3829,8 +3829,8 @@ bool Console::cmdBreakpointRead(int argc, const char **argv) {
}
Breakpoint bp;
- bp.type = BREAK_SELECTORREAD;
- bp.name = argv[1];
+ bp._type = BREAK_SELECTORREAD;
+ bp._name = argv[1];
_debugState._breakpoints.push_back(bp);
_debugState._activeBreakpointTypes |= BREAK_SELECTORREAD;
@@ -3846,8 +3846,8 @@ bool Console::cmdBreakpointWrite(int argc, const char **argv) {
}
Breakpoint bp;
- bp.type = BREAK_SELECTORWRITE;
- bp.name = argv[1];
+ bp._type = BREAK_SELECTORWRITE;
+ bp._name = argv[1];
_debugState._breakpoints.push_back(bp);
_debugState._activeBreakpointTypes |= BREAK_SELECTORWRITE;
@@ -3891,9 +3891,9 @@ bool Console::cmdBreakpointFunction(int argc, const char **argv) {
Thus, we can't check whether the command argument is a valid method name.
A breakpoint set on an invalid method name will just never trigger. */
Breakpoint bp;
- bp.type = BREAK_EXPORT;
+ bp._type = BREAK_EXPORT;
// script number, export number
- bp.address = (atoi(argv[1]) << 16 | atoi(argv[2]));
+ bp._address = (atoi(argv[1]) << 16 | atoi(argv[2]));
_debugState._breakpoints.push_back(bp);
_debugState._activeBreakpointTypes |= BREAK_EXPORT;
@@ -3917,8 +3917,8 @@ bool Console::cmdBreakpointAddress(int argc, const char **argv) {
}
Breakpoint bp;
- bp.type = BREAK_ADDRESS;
- bp.regAddress = make_reg32(addr.getSegment(), addr.getOffset());
+ bp._type = BREAK_ADDRESS;
+ bp._regAddress = make_reg32(addr.getSegment(), addr.getOffset());
_debugState._breakpoints.push_back(bp);
_debugState._activeBreakpointTypes |= BREAK_ADDRESS;
diff --git a/engines/sci/debug.h b/engines/sci/debug.h
index d7aa1b6e1e..b8557bb493 100644
--- a/engines/sci/debug.h
+++ b/engines/sci/debug.h
@@ -47,10 +47,10 @@ enum BreakpointType {
};
struct Breakpoint {
- BreakpointType type;
- uint32 address; ///< Breakpoints on exports
- reg32_t regAddress; ///< Breakpoints on addresses
- Common::String name; ///< Breakpoints on selector names
+ BreakpointType _type;
+ uint32 _address; ///< Breakpoints on exports
+ reg32_t _regAddress; ///< Breakpoints on addresses
+ Common::String _name; ///< Breakpoints on selector names
};
enum DebugSeeking {
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 17fc27154c..a4392983a1 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -685,10 +685,10 @@ bool SciEngine::checkSelectorBreakpoint(BreakpointType breakpointType, reg_t sen
Common::List<Breakpoint>::const_iterator bpIter;
for (bpIter = _debugState._breakpoints.begin(); bpIter != _debugState._breakpoints.end(); ++bpIter) {
- if (bpIter->type != breakpointType)
+ if (bpIter->_type != breakpointType)
continue;
- if (bpIter->name == methodName ||
- (bpIter->name.hasSuffix("::") && methodName.hasPrefix(bpIter->name))) {
+ if (bpIter->_name == methodName ||
+ (bpIter->_name.hasSuffix("::") && methodName.hasPrefix(bpIter->_name))) {
_console->debugPrintf("Break on %s (in [%04x:%04x])\n", methodName.c_str(), PRINT_REG(send_obj));
_debugState.debugging = true;
_debugState.breakpointWasHit = true;
@@ -704,7 +704,7 @@ bool SciEngine::checkExportBreakpoint(uint16 script, uint16 pubfunct) {
Common::List<Breakpoint>::const_iterator bp;
for (bp = _debugState._breakpoints.begin(); bp != _debugState._breakpoints.end(); ++bp) {
- if (bp->type == BREAK_EXPORT && bp->address == bpaddress) {
+ if (bp->_type == BREAK_EXPORT && bp->_address == bpaddress) {
_console->debugPrintf("Break on script %d, export %d\n", script, pubfunct);
_debugState.debugging = true;
_debugState.breakpointWasHit = true;
@@ -720,7 +720,7 @@ bool SciEngine::checkAddressBreakpoint(const reg32_t &address) {
if (_debugState._activeBreakpointTypes & BREAK_ADDRESS) {
Common::List<Breakpoint>::const_iterator bp;
for (bp = _debugState._breakpoints.begin(); bp != _debugState._breakpoints.end(); ++bp) {
- if (bp->type == BREAK_ADDRESS && bp->regAddress == address) {
+ if (bp->_type == BREAK_ADDRESS && bp->_regAddress == address) {
_console->debugPrintf("Break at %04x:%04x\n", PRINT_REG(address));
_debugState.debugging = true;
_debugState.breakpointWasHit = true;