VirtualBox

Opened 17 years ago

Last modified 4 years ago

#477 reopened defect

Hardware breakpoints don't work in Virtualbox (software virtualization only)

Reported by: marius_mtm Owned by:
Component: VMM Version: VirtualBox 3.1.6
Keywords: hardware breakpoints Cc:
Guest type: other Host type: other

Description (last modified by Frank Mehnert)

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger). [Hardware, on Execution] WinXP guest

Attachments (1)

VBox.log (39.5 KB ) - added by Mario Vilas 15 years ago.

Download all attachments as: .zip

Change History (44)

comment:1 by Sander van Leeuwen, 16 years ago

Being worked on at the moment, but will not show up until after 1.6.2.

comment:2 by Sander van Leeuwen, 16 years ago

Version: VirtualBox 1.4.0VirtualBox 1.6.0

comment:3 by Sander van Leeuwen, 16 years ago

priority: majorcritical
Summary: Hardware breakpoints doesn't work in VirtualboxHardware breakpoints don't work in Virtualbox

comment:4 by Frank Mehnert, 16 years ago

Component: otherVMM

in reply to:  1 comment:5 by marius_mtm, 16 years ago

Replying to sandervl73:

Being worked on at the moment, but will not show up until after 1.6.2.

Anything on this? Doesn't work in 1.6.4 Thx.

comment:6 by z1, 16 years ago

hi guys , virtualbox is the more user friendly virtual machine , for use , configuration and installation under linux. but with that lack you disappoint all a community of driver developers and reverse engineers.we are waiting for this more than one year now !!!!!

comment:7 by Frank Mehnert, 16 years ago

Yelling loud any writing dozens of exclamation marks does not help. Where did you attach the patch to fix that bug? The VirtualBox source code is freely available.

comment:8 by Tim Sobolev, 16 years ago

Here are files for testing this issue


Where did you attach the patch to fix that bug? The VirtualBox source code is freely available.

Not everyone can spend enough time to explore the source of VirtualBox to fix that bug. So many of them choose VMware instead VirtualBox solely because of this problem.

comment:9 by Sander van Leeuwen, 16 years ago

I've implemented it for VT-x and AMD-V, but haven't had time to test it yet. Hopefully later this week.

comment:10 by Sander van Leeuwen, 16 years ago

priority: criticalmajor
Version: VirtualBox 1.6.0VirtualBox 2.0.2

Successfully tested with windbg (kernel debugging session). Code is already in SVN.

in reply to:  description comment:11 by Stéphane Charette, 15 years ago

Replying to marius_mtm:

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger).

What does "don't work" means? I'm trying to figure out if this is the same problem I'm seeing.

With ddd/gdb, when it hits a breakpoint it (sometimes? always?) causes the host and guest to lock hard. System completely locks up. Cannot CTRL+ALT+DEL, must physically reboot the entire system.

I'm attempting to debug a simple C++ app on my Debian Etch-64bit guest. Host is Ubuntu 8.04-64bit. VB is 2.0.2.

comment:12 by Frank Mehnert, 15 years ago

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

in reply to:  12 comment:13 by Stéphane Charette, 15 years ago

Replying to frank:

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

That's just the things -- this problem, or a different one that I'm seeing? At this point I cannot confirm whether or not the problem I'm seeing is the same thing, or something else.

in reply to:  12 comment:14 by Stéphane Charette, 15 years ago

Replying to frank:

Anyway, the problem is fixed with the next major release (2.1, not 2.0.4).

This is causing me lots of pain. (The inability to debug my C++ applications.) Do we know approximately when VB 2.1 is scheduled to be released? Or is there a workaround that can be applied to VB 2.0.4?

comment:15 by Sander van Leeuwen, 15 years ago

Fixed in 2.1 for VT-x and AMD-V.

in reply to:  15 comment:16 by Tim Sobolev, 15 years ago

Replying to sandervl73:

Fixed in 2.1 for VT-x and AMD-V.

And what about processors without hardware virtualization?

comment:17 by jliu, 15 years ago

Still not work to me, windows xp sp3 host, and windows 2003 RC2 sp2 guest, set "ba" command on windbg but doesn't work, vmware and host are work fine.

comment:18 by Sander van Leeuwen, 15 years ago

netip: with or without VT-x/AMD-V? I have tried it myself and it worked.

comment:19 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed

No response, closing.

comment:20 by Sander van Leeuwen, 15 years ago

Resolution: fixed
Status: closedreopened

Actually this is still valid. Hardware breakpoints don't work with software virtualization.

comment:21 by Dalius, 15 years ago

I can confirm this problem. VT-x not enabled (actually even not available).

comment:22 by Mario Vilas, 15 years ago

I can also confirm this problem. Hardware breakpoints used to work normally until I enabled VT-x in the BIOS.

Furthermore, what seems to be happening is that the value of the Dr6 register is corrupted, so debuggers receive the corresponding debug event through the Win32 API, but they can't relate it to any of their breakpoints. At least that's what's happening to me right now.

In my machine the value of Dr6 is always 0xffff4ff0 no matter what breakpoint is hit. This is clearly wrong since at least one of the four low order bits of the register should be set when a hardware breakpoint is hit, and in my experience all other bits are always cleared (see the Wikipedia for further reference).

comment:23 by Mario Vilas, 15 years ago

I forgot to mention, VT-x is enabled in the BIOS but disabled for the virtual machine I'm using.

comment:24 by sid, 15 years ago

I can verify this, Olly refuses to break on any hardware breakpoint, regardless of whether VT-x is enabled or not, with Vista as host and guest.

comment:25 by Mario Vilas, 15 years ago

Do you have a chance to test it on XP?

I have XP (32 bits) as guest and Ubuntu 8.11 (64 bits) as host.

comment:26 by Mario Vilas, 15 years ago

Sorry, I read "can't" instead of "can", my bad :P

comment:27 by Sander van Leeuwen, 15 years ago

MarioVilas: I don't know how you come to your DR6 conclusion, but access breakpoints hit in windbg (kernel debugger) show up in DR6. Just checked again myself.

Why don't you first attach your VBox.log to prove that VT-x is indeed turned on?

comment:28 by sid, 15 years ago

It seems to work fine with both Ubuntu host/Vista guest and Ubuntu host/XP guest. I haven't tried Vista host/XP guest yet though.

comment:29 by Sander van Leeuwen, 15 years ago

Also keep in mind that hardware breakpoints are a scarce resource, so debuggers tend not to use them for code breakpoints. They just insert 'int 3's. I had to force windbg to use them (ba e 1 address).

comment:30 by Mario Vilas, 15 years ago

I'm afraid I could no longer reproduce that weird DR6 behavior :( however hardware breakpoints are still not working for me.

I'm attaching my VBox.log, it says nothing about VT-x (when it was disabled, I used to see a line saying "No VT-x or AMD-V CPU extension found. Reason VERR_VMX_MSR_LOCKED_OR_DISABLED"). The GUI shows this:

Base Memory: 512 MB Processor(s): 1 Boot Order: Floppy, CD/DVD-ROM, Hard Disk VT-x/AMD-V: Enabled Nested Paging: Disabled

by Mario Vilas, 15 years ago

Attachment: VBox.log added

comment:31 by Sander van Leeuwen, 14 years ago

MarioVilas: VT-x is indeed working. I've just fixed another issue with debug registers in VT-x (not AMD-V). Fix will be in 3.1.6

comment:32 by Frank Mehnert, 14 years ago

Resolution: fixed
Status: reopenedclosed

comment:33 by Sander van Leeuwen, 14 years ago

Component: VMMVMM/RAW
Resolution: fixed
Status: closedreopened
Summary: Hardware breakpoints don't work in VirtualboxHardware breakpoints don't work in Virtualbox (software virtualization only)

This is actually still valid as hardware breakpoints don't work in the software virtualization case.

comment:34 by Sander van Leeuwen, 14 years ago

Version: VirtualBox 2.0.2VirtualBox 3.1.6

in reply to:  description comment:35 by Dinesh Venkatesan, 14 years ago

Today, I have faced the same issue with version 3.2.6 r63112

Replying to marius_mtm:

It seems that doesn't work setting hardware breakpoints in Virtualbox (Olly Debugger). [Hardware, on Execution] WinXP guest

comment:36 by DineshVenkatesan, 13 years ago

This bug seems to be fixed in the latest version 3.2.12. I just tested it with Ubuntu 8.04 host and XP sp2 guest.

comment:37 by dimljajvbu, 13 years ago

Broken in 4.1.2, W7 64 host/XP guest, software virtualization. Enable hardware virtualization, hardware breakpoints in OllyDbg now work.

comment:38 by hwbpfan, 11 years ago

still broken in latest version 424, debug registers 5&6 seem to be corrupt (zero, when they are not supposed to be zero).

Last edited 11 years ago by hwbpfan (previous) (diff)

comment:39 by Frank Mehnert, 10 years ago

Description: modified (diff)

Might be improved with VBox 4.3.2.

comment:40 by aeichner, 8 years ago

Resolution: obsolete
Status: reopenedclosed

Please reopen if still relevant with a recent VirtualBox release.

comment:41 by saycool, 6 years ago

Resolution: obsolete
Status: closedreopened

I don't know when this bug is reopened but I just found that I cannot disable VT-x/AMD-V. I have upgraded to v5.2.12 and I don't know former version has same issue or not. Whenever I uncheck VT-x/AMD-V, configuration window complaints saying "found mis-configured setting". I don't know exact message for english version, cause I'm using korean version but meaning is something like that. And if I focus my mouse on that icon, it says "It will automatically VT-x/AMD-V because my virtual machine is 64bit". Whenever I try to enable kgdb on my client, it is disabled with message following. "kgdb: Could not allocate hwbreakpoints<cr>Disabling the kernel debugger". I set rodata=off and nokaslr on boot command line parameter, which worked correctly for ubuntu1804-guest on ubuntu1804-host. My host is windows10 home, and my guest is ubuntu-1804 with 1 cpu and 2048MB memory, and I need enable kgdb on my client. And My machine is i7-6700HQ.

Last edited 6 years ago by saycool (previous) (diff)

comment:42 by ONEZERONINE, 5 years ago

I was directed here looking a solution for:

A debugger has been detected Unload the debugger and try again.

This with Prisoner Of War on a Windows 98, 2000 and Xp emulated system.

Cheers!

comment:43 by aeichner, 4 years ago

Component: VMM/RAWVMM
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use