Page 5 of 12

Re: GUI for bochs debugger

Posted: Thu Aug 07, 2008 5:08 am
by Solar
WindowsNT wrote:3. I will replace 0x00 printing with dots
Not just 0x00, please. <ctype.h> has a nice function called isprint(). If that one returns false, print a dot. (You wouldn't want to print BELL, ACK, DEL or TAB, either.)

Re: GUI for bochs debugger

Posted: Thu Aug 07, 2008 6:08 am
by WindowsNT
1.05

* Added watch breakpoints (F9/Ctrl+F9 when in dump window. Note that they cannot be removed due to bochs "not implemented yet").

* Fixed bug in printing ascii characters in dump (print dots, reverse string).

* Resize on font change.

Michael

Re: GUI for bochs debugger

Posted: Thu Aug 07, 2008 12:45 pm
by stlw
WindowsNT wrote:1.05

* Added watch breakpoints (F9/Ctrl+F9 when in dump window. Note that they cannot be removed due to bochs "not implemented yet").

* Fixed bug in printing ascii characters in dump (print dots, reverse string).

* Resize on font change.

Michael
I hope I am not making you a hard life developing this very nice debugger interface.
But I am recently implemented and checked in new Bochs internal debugger watchpoints implementation and the interface for accessing watchpoints a bit changed.
The watchpoints will have handles now , similarly to the breakpoints. 16 simultanious watchpoints are supported, no matter if they are read or write.
Removing watchpoints is also supported by handle now.

Stanislav

Re: GUI for bochs debugger

Posted: Thu Aug 07, 2008 12:50 pm
by WindowsNT
That is why I keep the source private for now ;) When will the next version get released ?

Re: GUI for bochs debugger

Posted: Thu Aug 07, 2008 4:31 pm
by stlw
WindowsNT wrote:That is why I keep the source private for now ;) When will the next version get released ?
Next year may be ...
Actually new version is released when we have something valuable to release. It might be even next week if needed.
Currently we don't.

Stanislav

Re: GUI for bochs debugger

Posted: Sat Aug 09, 2008 10:16 am
by kmtdk
Well
it got a ideer, what you can include;
how long time the running os takes.

Kmt dk

Re: GUI for bochs debugger

Posted: Mon Aug 11, 2008 6:02 pm
by j00ru
Hi there,
Firstly, just wanted to express my huge admiration at this project ;>
It is really gonna make my (and surely others' too) work sooooo much easier ;>
I wish you kept developing it for a long time ;)

However, I found a little bug while testing it ;> Seems there is something wrong with the data part of the window:

Image

Looks like your frontend read/displayed single bytes as DWORDs or something...
That's all for now, keep this project alive man! ;p

Re: GUI for bochs debugger

Posted: Tue Aug 12, 2008 2:35 am
by viki
Hi,

I have a problem to run it. I downloaded bochs.exe from http://www.turboirc.com/tools/bochs.exe, but when I run it I have a console bochs window instead of GUI. Can you add a small know-how desc.?

Re: GUI for bochs debugger

Posted: Tue Aug 12, 2008 4:11 am
by j00ru
@up: isn't it about the
Make sure that the bochs option to load the gui is enabled
display_library: win32, options="windebug"
note on the first page? I had the same situation ;)

Re: GUI for bochs debugger

Posted: Tue Aug 12, 2008 7:30 am
by viki
Thx for reply, now it works.

Re: GUI for bochs debugger

Posted: Tue Aug 19, 2008 10:30 am
by stlw
Ping !
Any news about debugger sources release ?

Thanks,
Stanislav

Re: GUI for bochs debugger

Posted: Fri Aug 29, 2008 3:55 am
by WindowsNT
Well, since none adds any more suggestions...

http://www.turboirc.com/tools/bochssrc.rar

Contains:


* stuff.h - the code. For simplicity I packed it in one .h code rather than creating a lot of .cpps and have the user put them all to the project.
* 2.rc - the RC to
* readme.txt - directions on how to add these to the project.

Please do keep me updated for any efficient changes made to the source so I can update mine and release the binary.


Michael

Re: GUI for bochs debugger

Posted: Fri Aug 29, 2008 4:28 am
by AJ
Nice - thank you very much :)

Re: GUI for bochs debugger

Posted: Mon Sep 01, 2008 12:15 pm
by stlw
WindowsNT wrote:Well, since none adds any more suggestions...

http://www.turboirc.com/tools/bochssrc.rar

Contains:


* stuff.h - the code. For simplicity I packed it in one .h code rather than creating a lot of .cpps and have the user put them all to the project.
* 2.rc - the RC to
* readme.txt - directions on how to add these to the project.

Please do keep me updated for any efficient changes made to the source so I can update mine and release the binary.


Michael

Thank you very much, Michael.
Could I get permission to integrate the sources into Bochs main tree ?
Do you wish to add any lisense or we could use LGPL ?

thanks,
Stanislav

Re: GUI for bochs debugger

Posted: Mon Sep 01, 2008 12:42 pm
by WindowsNT
I 'd be happy if my code is part of the bochs source from now on, no problem for LGPL. Do compile it and tell me if it works without issues.

Also double check win32dialog.cpp win32_notify_callback, I think I 've changed it slightly but I don't quite remember , I think It was the "case BX_SYNC_EVT_GET_DBG_COMMAND:" case.

Code: Select all

BxEvent* win32_notify_callback(void *unused, BxEvent *event)
{
  int opts;
  bx_param_c *param;
  bx_param_string_c *sparam;
#if BX_DEBUGGER
  char debug_msg[1024];
  int i, j;
#endif

  event->retcode = -1;
  switch (event->type)
  {
    case BX_SYNC_EVT_LOG_ASK:
      LogAskDialog(event);
      return event;
#if BX_DEBUGGER
    case BX_SYNC_EVT_GET_DBG_COMMAND:
      {
        debug_cmd = new char[512];
        SendMessage(hDebugDialog, WM_USER, 0x1234, 1);
        debug_cmd_ready = FALSE;
        SendMessage(hDebugDialog, WM_USER, 0x1234, 2);
        while (!debug_cmd_ready && (hDebugDialog != NULL)) {
          Sleep(10);
        }
        if (hDebugDialog == NULL) {
          lstrcpy(debug_cmd, "q");
        } else {
          SendMessage(hDebugDialog, WM_USER, 0x1234, 0);
        }
        event->u.debugcmd.command = debug_cmd;
        event->retcode = 1;
        return event;
      }
    case BX_ASYNC_EVT_DBG_MSG:
      lstrcpy(debug_msg, (char*)event->u.logmsg.msg);
      for (i = 0; i < lstrlen(debug_msg); i++) {
        if (debug_msg[i] == 10) {
          for (j = lstrlen(debug_msg); j >= i; j--) debug_msg[j+1] = debug_msg[j];
          debug_msg[i] = 13;
          i++;
        }
      }
      SendMessage(hDebugDialog, WM_USER, 0x5678, (LPARAM)debug_msg);
      // free the char* which was allocated in dbg_printf
      delete [] ((char*)event->u.logmsg.msg);
      return event;
#endif
    case BX_SYNC_EVT_ASK_PARAM:
      param = event->u.param.param;
      if (param->get_type() == BXT_PARAM_STRING) {
        sparam = (bx_param_string_c *)param;
        opts = sparam->get_options()->get();
        if (opts & sparam->IS_FILENAME) {
          if (opts & sparam->SELECT_FOLDER_DLG) {
            event->retcode = BrowseDir(sparam->get_label(), sparam->getptr());
          } else if (param->get_parent() == NULL) {
            event->retcode = AskFilename(GetBochsWindow(), (bx_param_filename_c *)sparam, "txt");
          } else {
            event->retcode = FloppyDialog((bx_param_filename_c *)sparam);
          }
          return event;
        } else {
          event->retcode = AskString(sparam);
          return event;
        }
      } else if (param->get_type() == BXT_LIST) {
        event->retcode = Cdrom1Dialog();
        return event;
      } else if (param->get_type() == BXT_PARAM_BOOL) {
        UINT flag = MB_YESNO | MB_SETFOREGROUND;
        if (((bx_param_bool_c *)param)->get() == 0) {
          flag |= MB_DEFBUTTON2;
        }
        ((bx_param_bool_c *)param)->set(MessageBox(GetActiveWindow(), param->get_description(), param->get_label(), flag) == IDYES);
        event->retcode = 0;
        return event;
      }
    case BX_ASYNC_EVT_REFRESH:
#if BX_DEBUGGER
      RefreshDebugDialog();
      return event;
#endif
    case BX_SYNC_EVT_TICK: // called periodically by siminterface.
      // fall into default case
    default:
      return (*old_callback)(old_callback_arg, event);
  }
}