Author Topic: debugging - changing breakpoint type  (Read 4259 times)

Offline DoMeN

  • Multiple posting newcomer
  • *
  • Posts: 66
debugging - changing breakpoint type
« on: December 05, 2006, 02:52:35 pm »
Is ti somehow possible to set C::B to use hbreak instead of break when setting the breakpoints?

thanks

r. Domen

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: debugging - changing breakpoint type
« Reply #1 on: December 07, 2006, 10:44:07 am »
You can edit the sources accordingly, if you need this. Only need to insert one 'h' into a string (do a file search).

For mainstream, I think it is not acceptable for two obvious reasons, both of which are also stated in gdb's documentation:
  • the breakpoint is set in the same way, but the breakpoint requires hardware support and some target hardware may not have this support
  • However the hardware breakpoint registers can take a limited number of breakpoints. For example, on the DSU, only two data breakpoints can be set at a time, and GDB will reject this command if more than two are used.

We want Code::Blocks to be portable and generally be able to work on any platform on any kind of hardware. This neither means that we will write implementations for every hardware in existence, nor that we make any claims Code::Blocks actually works on any particular platform other than Windows/Linux/Macintosh.
However, it does mean that we are not willingly and knowingly writing code that cannot possibly work outside the few platforms that we develop for.

Also, we want Code::Blocks to be able to work with more than n breakpoints. It does not matter whether n is 2, or 8, or 16, or maybe even 256. Putting a hard limit on the number of breakpoints  calls for problems.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline DoMeN

  • Multiple posting newcomer
  • *
  • Posts: 66
Re: debugging - changing breakpoint type
« Reply #2 on: December 07, 2006, 02:33:42 pm »
Thanks for the explanation. I allredy changed the source accordingly. It's great to know that it wasn't redundant work  :D
r. Domen