Fix several minor issues.

Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
This commit is contained in:
Ricky Zhang 2017-10-06 20:01:55 -04:00
parent 175fbfde43
commit cba9b032fb
No known key found for this signature in database
GPG Key ID: 681AFAEF6CDEDB4C
3 changed files with 11 additions and 11 deletions

View File

@ -1034,15 +1034,15 @@ void mon_change_dir()
* Add break point
*/
void mon_add_break_point(uintptr adr)
void mon_add_break_point(uintptr addr)
{
BREAK_POINT_SET::iterator it;
BREAK_POINT_SET::iterator it = disabled_break_points.find(addr);
// Save break point
if ((it = disabled_break_points.find(adr)) == disabled_break_points.end())
active_break_points.insert(adr);
else {
if (it == disabled_break_points.end()) {
active_break_points.insert(addr);
} else {
disabled_break_points.erase(it);
active_break_points.insert(adr);
active_break_points.insert(addr);
}
}
@ -1050,7 +1050,7 @@ void mon_add_break_point(uintptr adr)
/*
* Load break point from file
*/
void mon_load_break_point(char* file_path)
void mon_load_break_point(const char* file_path)
{
FILE *file;
if (!(file = fopen(file_path, "r"))) {

View File

@ -108,7 +108,7 @@ extern void mon_write_word(uintptr adr, uint32 l);
// Check if break point is set
#define IS_BREAK_POINT(address) (active_break_points.find(address) != active_break_points.end())
// Add break point
extern void mon_add_break_point(uintptr adr);
extern void mon_load_break_point(char* file_path);
extern void mon_add_break_point(uintptr addr);
extern void mon_load_break_point(const char* file_path);
#endif