GUI for bochs debugger

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Locked
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: GUI for bochs debugger

Post 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.)
Every good solution is obvious once you've found it.
WindowsNT
Member
Member
Posts: 77
Joined: Thu Jun 26, 2008 12:55 pm

Re: GUI for bochs debugger

Post 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
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: GUI for bochs debugger

Post 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
WindowsNT
Member
Member
Posts: 77
Joined: Thu Jun 26, 2008 12:55 pm

Re: GUI for bochs debugger

Post by WindowsNT »

That is why I keep the source private for now ;) When will the next version get released ?
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: GUI for bochs debugger

Post 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
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: GUI for bochs debugger

Post by kmtdk »

Well
it got a ideer, what you can include;
how long time the running os takes.

Kmt dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
j00ru
Posts: 2
Joined: Mon Aug 11, 2008 5:37 pm

Re: GUI for bochs debugger

Post 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
viki
Posts: 14
Joined: Tue May 08, 2007 11:57 am
Location: Poland

Re: GUI for bochs debugger

Post 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.?
j00ru
Posts: 2
Joined: Mon Aug 11, 2008 5:37 pm

Re: GUI for bochs debugger

Post 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 ;)
viki
Posts: 14
Joined: Tue May 08, 2007 11:57 am
Location: Poland

Re: GUI for bochs debugger

Post by viki »

Thx for reply, now it works.
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: GUI for bochs debugger

Post by stlw »

Ping !
Any news about debugger sources release ?

Thanks,
Stanislav
WindowsNT
Member
Member
Posts: 77
Joined: Thu Jun 26, 2008 12:55 pm

Re: GUI for bochs debugger

Post 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
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: GUI for bochs debugger

Post by AJ »

Nice - thank you very much :)
stlw
Member
Member
Posts: 357
Joined: Fri Apr 04, 2008 6:43 am
Contact:

Re: GUI for bochs debugger

Post 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
WindowsNT
Member
Member
Posts: 77
Joined: Thu Jun 26, 2008 12:55 pm

Re: GUI for bochs debugger

Post 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);
  }
}

Locked