mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-03 03:22:40 +02:00
Update to v094r06 release.
byuu says: New terminal is in. Much nicer to use now. Command history makes a major difference in usability. The SMP is now fully traceable and debuggable. Basically they act as separate entities, you can trace both at the same time, but for the most part running and stepping is performed on the chip you select. I'm going to put off CPU+SMP interleave support for a while. I don't actually think it'll be too hard. Will get trickier if/when we support coprocessor debugging. Remaining tasks: - aliases - hotkeys - save states - window geometry Basically, the debugger's done. Just have to add the UI fluff. I also removed tracing/memory export from higan. It was always meant to be temporary until the debugger was remade.
This commit is contained in:
@@ -107,10 +107,10 @@ public:
|
||||
|
||||
inline string& strip();
|
||||
|
||||
inline optional<unsigned> find(rstring key) const;
|
||||
inline optional<unsigned> ifind(rstring key) const;
|
||||
inline optional<unsigned> qfind(rstring key) const;
|
||||
inline optional<unsigned> iqfind(rstring key) const;
|
||||
inline maybe<unsigned> find(rstring key) const;
|
||||
inline maybe<unsigned> ifind(rstring key) const;
|
||||
inline maybe<unsigned> qfind(rstring key) const;
|
||||
inline maybe<unsigned> iqfind(rstring key) const;
|
||||
|
||||
//core.hpp
|
||||
inline explicit operator bool() const;
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
|
||||
//list.hpp
|
||||
struct lstring : vector<string> {
|
||||
inline optional<unsigned> find(rstring) const;
|
||||
inline maybe<unsigned> find(rstring) const;
|
||||
inline string merge(const string&) const;
|
||||
inline lstring& isort();
|
||||
inline lstring& strip();
|
||||
|
@@ -36,11 +36,11 @@ inline bool strccat(char* target, const char* source, unsigned length);
|
||||
inline void strpcpy(char*& target, const char* source, unsigned& length);
|
||||
|
||||
//strpos.hpp
|
||||
inline optional<unsigned> strpos(const char* str, const char* key);
|
||||
inline optional<unsigned> istrpos(const char* str, const char* key);
|
||||
inline optional<unsigned> qstrpos(const char* str, const char* key);
|
||||
inline optional<unsigned> iqstrpos(const char* str, const char* key);
|
||||
template<bool Insensitive = false, bool Quoted = false> inline optional<unsigned> ustrpos(const char* str, const char* key);
|
||||
inline maybe<unsigned> strpos(const char* str, const char* key);
|
||||
inline maybe<unsigned> istrpos(const char* str, const char* key);
|
||||
inline maybe<unsigned> qstrpos(const char* str, const char* key);
|
||||
inline maybe<unsigned> iqstrpos(const char* str, const char* key);
|
||||
template<bool Insensitive = false, bool Quoted = false> inline maybe<unsigned> ustrpos(const char* str, const char* key);
|
||||
|
||||
//trim.hpp
|
||||
template<unsigned Limit = 0> inline char* ltrim(char* str, const char* key = " ");
|
||||
|
@@ -7,26 +7,26 @@
|
||||
namespace nall {
|
||||
|
||||
template<bool Insensitive, bool Quoted>
|
||||
optional<unsigned> ustrpos(const char* str, const char* key) {
|
||||
maybe<unsigned> ustrpos(const char* str, const char* key) {
|
||||
const char* base = str;
|
||||
|
||||
while(*str) {
|
||||
if(quoteskip<Quoted>(str)) continue;
|
||||
for(unsigned n = 0;; n++) {
|
||||
if(key[n] == 0) return {true, (unsigned)(str - base)};
|
||||
if(str[n] == 0) return false;
|
||||
if(key[n] == 0) return (unsigned)(str - base);
|
||||
if(str[n] == 0) return nothing;
|
||||
if(!chrequal<Insensitive>(str[n], key[n])) break;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
|
||||
return false;
|
||||
return nothing;
|
||||
}
|
||||
|
||||
optional<unsigned> strpos(const char* str, const char* key) { return ustrpos<false, false>(str, key); }
|
||||
optional<unsigned> istrpos(const char* str, const char* key) { return ustrpos<true, false>(str, key); }
|
||||
optional<unsigned> qstrpos(const char* str, const char* key) { return ustrpos<false, true>(str, key); }
|
||||
optional<unsigned> iqstrpos(const char* str, const char* key) { return ustrpos<true, true>(str, key); }
|
||||
maybe<unsigned> strpos(const char* str, const char* key) { return ustrpos<false, false>(str, key); }
|
||||
maybe<unsigned> istrpos(const char* str, const char* key) { return ustrpos<true, false>(str, key); }
|
||||
maybe<unsigned> qstrpos(const char* str, const char* key) { return ustrpos<false, true>(str, key); }
|
||||
maybe<unsigned> iqstrpos(const char* str, const char* key) { return ustrpos<true, true>(str, key); }
|
||||
|
||||
}
|
||||
|
||||
|
@@ -93,16 +93,16 @@ inline int64_t evaluateInteger(Node* node) {
|
||||
throw "invalid operator";
|
||||
}
|
||||
|
||||
inline optional<int64_t> integer(const string& expression) {
|
||||
inline maybe<int64_t> integer(const string& expression) {
|
||||
try {
|
||||
auto tree = new Node;
|
||||
const char* p = expression;
|
||||
parse(tree, p, 0);
|
||||
auto result = evaluateInteger(tree);
|
||||
delete tree;
|
||||
return {true, result};
|
||||
return result;
|
||||
} catch(const char*) {
|
||||
return false;
|
||||
return nothing;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,16 +138,16 @@ inline long double evaluateReal(Node* node) {
|
||||
throw "invalid operator";
|
||||
}
|
||||
|
||||
inline optional<long double> real(const string& expression) {
|
||||
inline maybe<long double> real(const string& expression) {
|
||||
try {
|
||||
auto tree = new Node;
|
||||
const char* p = expression;
|
||||
parse(tree, p, 0);
|
||||
auto result = evaluateReal(tree);
|
||||
delete tree;
|
||||
return {true, result};
|
||||
return result;
|
||||
} catch(const char*) {
|
||||
return false;
|
||||
return nothing;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,11 +2,11 @@
|
||||
|
||||
namespace nall {
|
||||
|
||||
optional<unsigned> lstring::find(rstring key) const {
|
||||
maybe<unsigned> lstring::find(rstring key) const {
|
||||
for(unsigned i = 0; i < size(); i++) {
|
||||
if(operator[](i) == key) return {true, i};
|
||||
if(operator[](i) == key) return i;
|
||||
}
|
||||
return false;
|
||||
return nothing;
|
||||
}
|
||||
|
||||
string lstring::merge(const string& separator) const {
|
||||
|
@@ -114,10 +114,10 @@ string& string::strip() {
|
||||
return *this;
|
||||
}
|
||||
|
||||
optional<unsigned> string::find(rstring key) const { return strpos(data(), key); }
|
||||
optional<unsigned> string::ifind(rstring key) const { return istrpos(data(), key); }
|
||||
optional<unsigned> string::qfind(rstring key) const { return qstrpos(data(), key); }
|
||||
optional<unsigned> string::iqfind(rstring key) const { return iqstrpos(data(), key); }
|
||||
maybe<unsigned> string::find(rstring key) const { return strpos(data(), key); }
|
||||
maybe<unsigned> string::ifind(rstring key) const { return istrpos(data(), key); }
|
||||
maybe<unsigned> string::qfind(rstring key) const { return qstrpos(data(), key); }
|
||||
maybe<unsigned> string::iqfind(rstring key) const { return iqstrpos(data(), key); }
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user