This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/15299] Verify breakpoint bytes when removing the breakpoint
- From: "SztfG at yandex dot ru" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sun, 24 Mar 2013 13:45:22 +0000
- Subject: [Bug gdb/15299] Verify breakpoint bytes when removing the breakpoint
- Auto-submitted: auto-generated
- References: <bug-15299-4717 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15299
--- Comment #6 from SztfG at yandex dot ru 2013-03-24 13:45:22 UTC ---
There are very similar bug about software break point
http://sourceware.org/bugzilla/show_bug.cgi?id=14959
I found this:
http://www.sourceware.org/gdb/onlinedocs/gdbint.html#Algorithms
It says:
>Software breakpoints require gdb to do somewhat more work. The basic theory is that gdb will replace a program instruction with a trap, illegal divide, or some other instruction that will cause an exception, and then when it's encountered, gdb will take the exception and stop the program. When the user says to continue, gdb will restore the original instruction, single-step, re-insert the trap, and continue on.
>Since it literally overwrites the program being tested, the program area must be writable, so this technique won't work on programs in ROM. It can also distort the behavior of programs that examine themselves, although such a situation would be highly unusual.
So, there are bug with restoring the original instruction
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.