Fixed compilation errors that occur with debugger enabled.

This commit is contained in:
Volker Ruppert 2016-12-06 18:07:05 +00:00
parent 7ccc859b00
commit 974c8d5124
2 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,7 @@
// $Id$ // $Id$
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2001-2015 The Bochs Project // Copyright (C) 2001-2016 The Bochs Project
// //
// This library is free software; you can redistribute it and/or // This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public // modify it under the terms of the GNU Lesser General Public
@ -165,8 +165,6 @@ int bx_dbg_set_rcfile(const char *rcfile)
bx_bool bx_dbg_register_debug_info(const char *devname, void *dev) bx_bool bx_dbg_register_debug_info(const char *devname, void *dev)
{ {
debug_info_t *debug_info;
debug_info_t *debug_info = new debug_info_t; debug_info_t *debug_info = new debug_info_t;
debug_info->name = devname; debug_info->name = devname;
debug_info->device = (bx_devmodel_c*)dev; debug_info->device = (bx_devmodel_c*)dev;

View File

@ -8,7 +8,7 @@
// //
// Modified by Bruce Ewing // Modified by Bruce Ewing
// //
// Copyright (C) 2008-2014 The Bochs Project // Copyright (C) 2008-2016 The Bochs Project
#include "config.h" #include "config.h"
@ -3443,7 +3443,7 @@ BxEvent *enh_dbg_notify_callback(void *unused, BxEvent *event)
static size_t strip_whitespace(char *s) static size_t strip_whitespace(char *s)
{ {
size_t ptr = 0; size_t ptr = 0;
char *tmp = new [strlen(s)+1]; char *tmp = new char[strlen(s)+1];
strcpy(tmp, s); strcpy(tmp, s);
while (s[ptr] == ' ') ptr++; while (s[ptr] == ' ') ptr++;
if (ptr > 0) strcpy(s, tmp+ptr); if (ptr > 0) strcpy(s, tmp+ptr);