mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Changed a few 'const char *' ==> 'const std::string &' in the MAME debugger (#2170)
This commit is contained in:
parent
f1c043d18c
commit
2af3233101
@ -231,7 +231,7 @@ CMDERR debugger_console::internal_execute_command(bool execute, int params, char
|
|||||||
and either executes or just validates it
|
and either executes or just validates it
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
|
||||||
CMDERR debugger_console::internal_parse_command(const char *original_command, bool execute)
|
CMDERR debugger_console::internal_parse_command(const std::string &original_command, bool execute)
|
||||||
{
|
{
|
||||||
char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH];
|
char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH];
|
||||||
char *params[MAX_COMMAND_PARAMS] = { nullptr };
|
char *params[MAX_COMMAND_PARAMS] = { nullptr };
|
||||||
@ -240,7 +240,7 @@ CMDERR debugger_console::internal_parse_command(const char *original_command, bo
|
|||||||
char *p, c = 0;
|
char *p, c = 0;
|
||||||
|
|
||||||
/* make a copy of the command */
|
/* make a copy of the command */
|
||||||
strcpy(command, original_command);
|
strcpy(command, original_command.c_str());
|
||||||
|
|
||||||
/* loop over all semicolon-separated stuff */
|
/* loop over all semicolon-separated stuff */
|
||||||
for (p = command; *p != 0; )
|
for (p = command; *p != 0; )
|
||||||
@ -327,13 +327,13 @@ CMDERR debugger_console::internal_parse_command(const char *original_command, bo
|
|||||||
execute_command - execute a command string
|
execute_command - execute a command string
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
|
||||||
CMDERR debugger_console::execute_command(const char *command, bool echo)
|
CMDERR debugger_console::execute_command(const std::string &command, bool echo)
|
||||||
{
|
{
|
||||||
CMDERR result;
|
CMDERR result;
|
||||||
|
|
||||||
/* echo if requested */
|
/* echo if requested */
|
||||||
if (echo)
|
if (echo)
|
||||||
printf(">%s\n", command);
|
printf(">%s\n", command.c_str());
|
||||||
|
|
||||||
/* parse and execute */
|
/* parse and execute */
|
||||||
result = internal_parse_command(command, true);
|
result = internal_parse_command(command, true);
|
||||||
@ -342,7 +342,7 @@ CMDERR debugger_console::execute_command(const char *command, bool echo)
|
|||||||
if (result != CMDERR_NONE)
|
if (result != CMDERR_NONE)
|
||||||
{
|
{
|
||||||
if (!echo)
|
if (!echo)
|
||||||
printf(">%s\n", command);
|
printf(">%s\n", command.c_str());
|
||||||
printf(" %*s^\n", CMDERR_ERROR_OFFSET(result), "");
|
printf(" %*s^\n", CMDERR_ERROR_OFFSET(result), "");
|
||||||
printf("%s\n", cmderr_to_string(result));
|
printf("%s\n", cmderr_to_string(result));
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ public:
|
|||||||
debugger_console(running_machine &machine);
|
debugger_console(running_machine &machine);
|
||||||
|
|
||||||
/* command handling */
|
/* command handling */
|
||||||
CMDERR execute_command(const char *command, bool echo);
|
CMDERR execute_command(const std::string &command, bool echo);
|
||||||
CMDERR validate_command(const char *command);
|
CMDERR validate_command(const char *command);
|
||||||
void register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function<void(int, const std::vector<std::string> &)> handler);
|
void register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function<void(int, const std::vector<std::string> &)> handler);
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ private:
|
|||||||
|
|
||||||
void trim_parameter(char **paramptr, bool keep_quotes);
|
void trim_parameter(char **paramptr, bool keep_quotes);
|
||||||
CMDERR internal_execute_command(bool execute, int params, char **param);
|
CMDERR internal_execute_command(bool execute, int params, char **param);
|
||||||
CMDERR internal_parse_command(const char *original_command, bool execute);
|
CMDERR internal_parse_command(const std::string &original_command, bool execute);
|
||||||
|
|
||||||
struct debug_command
|
struct debug_command
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// copyright-holders:Aaron Giles
|
// copyright-holders:Aaron Giles
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|
||||||
debugcpu.c
|
debugcpu.cpp
|
||||||
|
|
||||||
Debugger CPU/memory interface engine.
|
Debugger CPU/memory interface engine.
|
||||||
|
|
||||||
@ -25,6 +25,7 @@
|
|||||||
#include "xmlfile.h"
|
#include "xmlfile.h"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -45,7 +46,6 @@ debugger_cpu::debugger_cpu(running_machine &machine)
|
|||||||
, m_livecpu(nullptr)
|
, m_livecpu(nullptr)
|
||||||
, m_visiblecpu(nullptr)
|
, m_visiblecpu(nullptr)
|
||||||
, m_breakcpu(nullptr)
|
, m_breakcpu(nullptr)
|
||||||
, m_source_file(nullptr)
|
|
||||||
, m_symtable(nullptr)
|
, m_symtable(nullptr)
|
||||||
, m_execution_state(EXECUTION_STATE_STOPPED)
|
, m_execution_state(EXECUTION_STATE_STOPPED)
|
||||||
, m_bpindex(1)
|
, m_bpindex(1)
|
||||||
@ -189,24 +189,24 @@ symbol_table* debugger_cpu::get_visible_symtable()
|
|||||||
|
|
||||||
void debugger_cpu::source_script(const char *file)
|
void debugger_cpu::source_script(const char *file)
|
||||||
{
|
{
|
||||||
/* close any existing source file */
|
// close any existing source file
|
||||||
if (m_source_file != nullptr)
|
m_source_file.reset();
|
||||||
{
|
|
||||||
fclose(m_source_file);
|
|
||||||
m_source_file = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* open a new one if requested */
|
// open a new one if requested
|
||||||
if (file != nullptr)
|
if (file != nullptr)
|
||||||
{
|
{
|
||||||
m_source_file = fopen(file, "r");
|
auto source_file = std::make_unique<std::ifstream>(file, std::ifstream::in);
|
||||||
if (!m_source_file)
|
if (source_file->fail())
|
||||||
{
|
{
|
||||||
if (m_machine.phase() == machine_phase::RUNNING)
|
if (m_machine.phase() == machine_phase::RUNNING)
|
||||||
m_machine.debugger().console().printf("Cannot open command file '%s'\n", file);
|
m_machine.debugger().console().printf("Cannot open command file '%s'\n", file);
|
||||||
else
|
else
|
||||||
fatalerror("Cannot open command file '%s'\n", file);
|
fatalerror("Cannot open command file '%s'\n", file);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_source_file = std::move(source_file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -871,36 +871,32 @@ void debugger_cpu::reset_transient_flags()
|
|||||||
|
|
||||||
void debugger_cpu::process_source_file()
|
void debugger_cpu::process_source_file()
|
||||||
{
|
{
|
||||||
/* loop until the file is exhausted or until we are executing again */
|
std::string buf;
|
||||||
while (m_source_file != nullptr && m_execution_state == EXECUTION_STATE_STOPPED)
|
|
||||||
|
// loop until the file is exhausted or until we are executing again
|
||||||
|
while (m_execution_state == EXECUTION_STATE_STOPPED
|
||||||
|
&& m_source_file
|
||||||
|
&& std::getline(*m_source_file, buf))
|
||||||
{
|
{
|
||||||
/* stop at the end of file */
|
// strip out comments (text after '//')
|
||||||
if (feof(m_source_file))
|
size_t pos = buf.find("//");
|
||||||
{
|
if (pos != std::string::npos)
|
||||||
fclose(m_source_file);
|
buf.resize(pos);
|
||||||
m_source_file = nullptr;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* fetch the next line */
|
// strip whitespace
|
||||||
char buf[512];
|
strtrimrightspace(buf);
|
||||||
memset(buf, 0, sizeof(buf));
|
|
||||||
fgets(buf, sizeof(buf), m_source_file);
|
|
||||||
|
|
||||||
/* strip out comments (text after '//') */
|
// execute the command
|
||||||
char *s = strstr(buf, "//");
|
if (!buf.empty())
|
||||||
if (s)
|
|
||||||
*s = '\0';
|
|
||||||
|
|
||||||
/* strip whitespace */
|
|
||||||
int i = (int)strlen(buf);
|
|
||||||
while((i > 0) && (isspace(u8(buf[i-1]))))
|
|
||||||
buf[--i] = '\0';
|
|
||||||
|
|
||||||
/* execute the command */
|
|
||||||
if (buf[0])
|
|
||||||
m_machine.debugger().console().execute_command(buf, true);
|
m_machine.debugger().console().execute_command(buf, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_source_file && !m_source_file->good())
|
||||||
|
{
|
||||||
|
if (m_source_file->fail())
|
||||||
|
m_machine.debugger().console().printf("I/O error, script processing terminated\n");
|
||||||
|
m_source_file.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2755,7 +2751,7 @@ void device_debug::breakpoint_check(offs_t pc)
|
|||||||
|
|
||||||
// if we hit, evaluate the action
|
// if we hit, evaluate the action
|
||||||
if (!bp->m_action.empty())
|
if (!bp->m_action.empty())
|
||||||
m_device.machine().debugger().console().execute_command(bp->m_action.c_str(), false);
|
m_device.machine().debugger().console().execute_command(bp->m_action, false);
|
||||||
|
|
||||||
// print a notification, unless the action made us go again
|
// print a notification, unless the action made us go again
|
||||||
if (debugcpu.execution_state() == EXECUTION_STATE_STOPPED)
|
if (debugcpu.execution_state() == EXECUTION_STATE_STOPPED)
|
||||||
@ -2774,7 +2770,7 @@ void device_debug::breakpoint_check(offs_t pc)
|
|||||||
// if we hit, evaluate the action
|
// if we hit, evaluate the action
|
||||||
if (!rp->m_action.empty())
|
if (!rp->m_action.empty())
|
||||||
{
|
{
|
||||||
m_device.machine().debugger().console().execute_command(rp->m_action.c_str(), false);
|
m_device.machine().debugger().console().execute_command(rp->m_action, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// print a notification, unless the action made us go again
|
// print a notification, unless the action made us go again
|
||||||
@ -2887,7 +2883,7 @@ void debugger_cpu::watchpoint_check(address_space& space, int type, offs_t addre
|
|||||||
m_execution_state = EXECUTION_STATE_STOPPED;
|
m_execution_state = EXECUTION_STATE_STOPPED;
|
||||||
|
|
||||||
// if we hit, evaluate the action
|
// if we hit, evaluate the action
|
||||||
if (strlen(wp->action()) > 0)
|
if (!wp->action().empty())
|
||||||
m_machine.debugger().console().execute_command(wp->action(), false);
|
m_machine.debugger().console().execute_command(wp->action(), false);
|
||||||
|
|
||||||
// print a notification, unless the action made us go again
|
// print a notification, unless the action made us go again
|
||||||
@ -3336,7 +3332,7 @@ void device_debug::tracer::update(offs_t pc)
|
|||||||
|
|
||||||
// execute any trace actions first
|
// execute any trace actions first
|
||||||
if (!m_action.empty())
|
if (!m_action.empty())
|
||||||
m_debug.m_device.machine().debugger().console().execute_command(m_action.c_str(), false);
|
m_debug.m_device.machine().debugger().console().execute_command(m_action, false);
|
||||||
|
|
||||||
// print the address
|
// print the address
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
|
@ -110,7 +110,7 @@ public:
|
|||||||
offs_t address() const { return m_address; }
|
offs_t address() const { return m_address; }
|
||||||
offs_t length() const { return m_length; }
|
offs_t length() const { return m_length; }
|
||||||
const char *condition() const { return m_condition.original_string(); }
|
const char *condition() const { return m_condition.original_string(); }
|
||||||
const char *action() const { return m_action.c_str(); }
|
const std::string &action() const { return m_action; }
|
||||||
|
|
||||||
// setters
|
// setters
|
||||||
void setEnabled(bool value) { m_enabled = value; }
|
void setEnabled(bool value) { m_enabled = value; }
|
||||||
@ -599,7 +599,7 @@ private:
|
|||||||
device_t * m_visiblecpu;
|
device_t * m_visiblecpu;
|
||||||
device_t * m_breakcpu;
|
device_t * m_breakcpu;
|
||||||
|
|
||||||
FILE * m_source_file; // script source file
|
std::unique_ptr<std::istream> m_source_file; // script source file
|
||||||
|
|
||||||
std::unique_ptr<symbol_table> m_symtable; // global symbol table
|
std::unique_ptr<symbol_table> m_symtable; // global symbol table
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ public:
|
|||||||
|
|
||||||
// setters
|
// setters
|
||||||
void mark_dirty() { m_dirty = true; }
|
void mark_dirty() { m_dirty = true; }
|
||||||
void set_string(const char *string) { m_string.assign(string); m_dirty = true; }
|
template <typename... Params> void set_string(Params &&... args) { m_string.assign(std::forward<Params>(args)...); m_dirty = true; }
|
||||||
void set_context(symbol_table *context);
|
void set_context(symbol_table *context);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -637,7 +637,7 @@ offs_t debug_view_disasm::selected_address()
|
|||||||
// describing the home address
|
// describing the home address
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void debug_view_disasm::set_expression(const char *expression)
|
void debug_view_disasm::set_expression(const std::string &expression)
|
||||||
{
|
{
|
||||||
begin_update();
|
begin_update();
|
||||||
m_expression.set_string(expression);
|
m_expression.set_string(expression);
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
offs_t selected_address();
|
offs_t selected_address();
|
||||||
|
|
||||||
// setters
|
// setters
|
||||||
void set_expression(const char *expression);
|
void set_expression(const std::string &expression);
|
||||||
void set_right_column(disasm_right_column contents);
|
void set_right_column(disasm_right_column contents);
|
||||||
void set_backward_steps(u32 steps);
|
void set_backward_steps(u32 steps);
|
||||||
void set_disasm_width(u32 width);
|
void set_disasm_width(u32 width);
|
||||||
|
@ -873,7 +873,7 @@ void debug_view_memory::write(u8 size, offs_t offs, u64 data)
|
|||||||
// describing the home address
|
// describing the home address
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void debug_view_memory::set_expression(const char *expression)
|
void debug_view_memory::set_expression(const std::string &expression)
|
||||||
{
|
{
|
||||||
begin_update();
|
begin_update();
|
||||||
m_expression.set_string(expression);
|
m_expression.set_string(expression);
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
offs_t addressAtCursorPosition(const debug_view_xy& pos) { return get_cursor_pos(pos).m_address; }
|
offs_t addressAtCursorPosition(const debug_view_xy& pos) { return get_cursor_pos(pos).m_address; }
|
||||||
|
|
||||||
// setters
|
// setters
|
||||||
void set_expression(const char *expression);
|
void set_expression(const std::string &expression);
|
||||||
void set_chunks_per_row(u32 rowchunks);
|
void set_chunks_per_row(u32 rowchunks);
|
||||||
void set_data_format(int format); // 1-8 current values 9 32bit floating point
|
void set_data_format(int format); // 1-8 current values 9 32bit floating point
|
||||||
void set_reverse(bool reverse);
|
void set_reverse(bool reverse);
|
||||||
|
@ -103,7 +103,7 @@ static int cActionAscending(const void* a, const void* b)
|
|||||||
{
|
{
|
||||||
const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
|
const device_debug::watchpoint* left = *(device_debug::watchpoint**)a;
|
||||||
const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
|
const device_debug::watchpoint* right = *(device_debug::watchpoint**)b;
|
||||||
return strcmp(left->action(), right->action());
|
return left->action().compare(right->action());
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cActionDescending(const void* a, const void* b)
|
static int cActionDescending(const void* a, const void* b)
|
||||||
|
@ -171,25 +171,39 @@ void strreplacechr(std::string& str, char ch, char newch)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::string internal_strtrimspace(std::string& str, bool right_only)
|
||||||
|
{
|
||||||
|
// identify the start
|
||||||
|
std::string::iterator start = str.begin();
|
||||||
|
if (!right_only)
|
||||||
|
{
|
||||||
|
start = std::find_if(
|
||||||
|
str.begin(),
|
||||||
|
str.end(),
|
||||||
|
[](char c) { return !isspace(uint8_t(c)); });
|
||||||
|
}
|
||||||
|
|
||||||
|
// identify the end
|
||||||
|
std::string::iterator end = std::find_if(
|
||||||
|
str.rbegin(),
|
||||||
|
std::string::reverse_iterator(start),
|
||||||
|
[](char c) { return !isspace(uint8_t(c)); }).base();
|
||||||
|
|
||||||
|
// extract the string
|
||||||
|
str = end > start
|
||||||
|
? str.substr(start - str.begin(), end - start)
|
||||||
|
: "";
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
std::string strtrimspace(std::string& str)
|
std::string strtrimspace(std::string& str)
|
||||||
{
|
{
|
||||||
int start = 0;
|
return internal_strtrimspace(str, false);
|
||||||
for (auto & elem : str)
|
}
|
||||||
{
|
|
||||||
if (!isspace(uint8_t(elem))) break;
|
std::string strtrimrightspace(std::string& str)
|
||||||
start++;
|
{
|
||||||
}
|
return internal_strtrimspace(str, true);
|
||||||
int end = str.length();
|
|
||||||
if (end > 0)
|
|
||||||
{
|
|
||||||
for (size_t i = str.length() - 1; i > 0; i--)
|
|
||||||
{
|
|
||||||
if (!isspace(uint8_t(str[i]))) break;
|
|
||||||
end--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
str = str.substr(start, end-start);
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string strmakeupper(std::string& str)
|
std::string strmakeupper(std::string& str)
|
||||||
|
@ -67,6 +67,7 @@ int strcatvprintf(std::string &str, const char *format, va_list args);
|
|||||||
void strdelchr(std::string& str, char chr);
|
void strdelchr(std::string& str, char chr);
|
||||||
void strreplacechr(std::string& str, char ch, char newch);
|
void strreplacechr(std::string& str, char ch, char newch);
|
||||||
std::string strtrimspace(std::string& str);
|
std::string strtrimspace(std::string& str);
|
||||||
|
std::string strtrimrightspace(std::string& str);
|
||||||
std::string strmakeupper(std::string& str);
|
std::string strmakeupper(std::string& str);
|
||||||
std::string strmakelower(std::string& str);
|
std::string strmakelower(std::string& str);
|
||||||
int strreplace(std::string &str, const std::string& search, const std::string& replace);
|
int strreplace(std::string &str, const std::string& search, const std::string& replace);
|
||||||
|
@ -453,9 +453,9 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void consolewin_info::process_string(char const *string)
|
void consolewin_info::process_string(std::string const &string)
|
||||||
{
|
{
|
||||||
if (string[0] == 0) // an empty string is a single step
|
if (string.empty()) // an empty string is a single step
|
||||||
machine().debugger().cpu().get_visible_cpu()->debug()->single_step();
|
machine().debugger().cpu().get_visible_cpu()->debug()->single_step();
|
||||||
else // otherwise, just process the command
|
else // otherwise, just process the command
|
||||||
machine().debugger().console().execute_command(string, true);
|
machine().debugger().console().execute_command(string, true);
|
||||||
|
@ -42,7 +42,7 @@ private:
|
|||||||
DEVOPTION_MAX
|
DEVOPTION_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void process_string(char const *string) override;
|
virtual void process_string(std::string const &string) override;
|
||||||
|
|
||||||
static void build_generic_filter(device_image_interface *img, bool is_save, std::string &filter);
|
static void build_generic_filter(device_image_interface *img, bool is_save, std::string &filter);
|
||||||
static void add_filter_entry(std::string &dest, char const *description, char const *extensions);
|
static void add_filter_entry(std::string &dest, char const *description, char const *extensions);
|
||||||
|
@ -33,7 +33,7 @@ offs_t disasmview_info::selected_address() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void disasmview_info::set_expression(char const *string)
|
void disasmview_info::set_expression(const std::string &string)
|
||||||
{
|
{
|
||||||
view<debug_view_disasm>()->set_expression(string);
|
view<debug_view_disasm>()->set_expression(string);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
disasm_right_column right_column() const;
|
disasm_right_column right_column() const;
|
||||||
offs_t selected_address() const;
|
offs_t selected_address() const;
|
||||||
|
|
||||||
void set_expression(const char *expression);
|
void set_expression(const std::string &expression);
|
||||||
void set_right_column(disasm_right_column contents);
|
void set_right_column(disasm_right_column contents);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ void disasmwin_info::draw_contents(HDC dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void disasmwin_info::process_string(char const *string)
|
void disasmwin_info::process_string(const std::string &string)
|
||||||
{
|
{
|
||||||
// set the string to the disasm view
|
// set the string to the disasm view
|
||||||
downcast<disasmview_info *>(m_views[0].get())->set_expression(string);
|
downcast<disasmview_info *>(m_views[0].get())->set_expression(string);
|
||||||
|
@ -26,7 +26,7 @@ protected:
|
|||||||
virtual void draw_contents(HDC dc) override;
|
virtual void draw_contents(HDC dc) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void process_string(char const *string) override;
|
virtual void process_string(const std::string &string) override;
|
||||||
|
|
||||||
void update_caption();
|
void update_caption();
|
||||||
|
|
||||||
|
@ -34,14 +34,14 @@ protected:
|
|||||||
void set_editwnd_bounds(RECT const &bounds);
|
void set_editwnd_bounds(RECT const &bounds);
|
||||||
void set_editwnd_text(char const *text);
|
void set_editwnd_text(char const *text);
|
||||||
void editwnd_select_all();
|
void editwnd_select_all();
|
||||||
void set_edit_defstr(char const *string) { m_edit_defstr = string; }
|
void set_edit_defstr(const std::string &string) { m_edit_defstr = string; }
|
||||||
|
|
||||||
virtual void draw_contents(HDC dc) override;
|
virtual void draw_contents(HDC dc) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::deque<std::basic_string<TCHAR> > history_deque;
|
typedef std::deque<std::basic_string<TCHAR> > history_deque;
|
||||||
|
|
||||||
virtual void process_string(char const *string) = 0;
|
virtual void process_string(const std::string &string) = 0;
|
||||||
|
|
||||||
LRESULT edit_proc(UINT message, WPARAM wparam, LPARAM lparam);
|
LRESULT edit_proc(UINT message, WPARAM wparam, LPARAM lparam);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ bool memoryview_info::physical() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void memoryview_info::set_expression(char const *string)
|
void memoryview_info::set_expression(const std::string &string)
|
||||||
{
|
{
|
||||||
view<debug_view_memory>()->set_expression(string);
|
view<debug_view_memory>()->set_expression(string);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
bool reverse() const;
|
bool reverse() const;
|
||||||
bool physical() const;
|
bool physical() const;
|
||||||
|
|
||||||
void set_expression(char const *string);
|
void set_expression(const std::string &string);
|
||||||
void set_data_format(uint8_t dataformat);
|
void set_data_format(uint8_t dataformat);
|
||||||
void set_chunks_per_row(uint32_t rowchunks);
|
void set_chunks_per_row(uint32_t rowchunks);
|
||||||
void set_reverse(bool reverse);
|
void set_reverse(bool reverse);
|
||||||
|
@ -283,7 +283,7 @@ void memorywin_info::draw_contents(HDC dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void memorywin_info::process_string(char const *string)
|
void memorywin_info::process_string(const std::string &string)
|
||||||
{
|
{
|
||||||
// set the string to the memory view
|
// set the string to the memory view
|
||||||
downcast<memoryview_info *>(m_views[0].get())->set_expression(string);
|
downcast<memoryview_info *>(m_views[0].get())->set_expression(string);
|
||||||
|
@ -29,7 +29,7 @@ protected:
|
|||||||
virtual void draw_contents(HDC dc) override;
|
virtual void draw_contents(HDC dc) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void process_string(char const *string) override;
|
virtual void process_string(const std::string &string) override;
|
||||||
|
|
||||||
void update_caption();
|
void update_caption();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user