Hardware breakpoints cannot be deleted -> if Address no longer exists #1456

Open
winkerbie opened this Issue Feb 6, 2017 · 8 comments

Projects

None yet

3 participants

@winkerbie

This is a problem of both x32 and x64 dbg
Windows 10 x64

After debugging a program loaded at certain address apace (e.g. 0x00400000), and using hardware breakpoints, those breakpoints are saved into the database file.

However if I debug that program at the later date and it is loaded into a different Address space (e.g. 0x00800000), those saved (absolute address) hardware breakpoints are no longer valid. Worse still I cannot delete those old hardware breakpoints, the debugger just displays an error saying "address doesn't exist"

Major Bug...

@lupier
lupier commented Feb 7, 2017

I can recommend turn off ASLR (at your own risk) or set DYNAMICBASE in compiler to something fixed like 0x30000000 or set "relocation stripped" flag in PE header.

@mrexodia
Member
mrexodia commented Feb 7, 2017

Are these hardware breakpoints placed inside module code?

@winkerbie

No sorry I should have been clearer

It has only happened when hwbp are placed in DLLs loaded by the exe, therefore very likely to change base address if reloaded

@mrexodia
Member
mrexodia commented Feb 7, 2017
@winkerbie

yes that's what I thought.
It works for software breakpoints but the hardware breakpoints get stuck.

I will try and get a screenshot

@winkerbie
winkerbie commented Feb 9, 2017 edited

I realize what was happening...
If the DLL hasn not yet been loaded then the breakpoints (hardware/software) cannot be deleted.
The debug registers remain empty though

I guess it no big deal...though it would be helpful to be able to delete them whenever
its probably not your priority

@winkerbie winkerbie closed this Feb 9, 2017
@winkerbie winkerbie reopened this Feb 9, 2017
@winkerbie

Maybe you could add an option to hide breakpoints of DLLs that have not yet been loaded?

@mrexodia
Member

@winkerbie that's what the 'Status' is for. It should show 'Inactive' however I do plan to add support for deleting breakpoints that don't exist yet but at the moment I'm quite busy so I cannot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment