This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/15299] Verify breakpoint bytes when removing the breakpoint


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]