Re: help string for "break" command

mathieu lacage
2007-01-12T18:11:21Z

On Fri, 2007-01-12 at 08:49 -0500, Daniel Jacobowitz wrote:
> On Fri, Jan 12, 2007 at 02:45:16PM +0100, Mathieu Lacage wrote:
> > Am I right in assuming that the gdb command "break" places exclusively
> > so-called software-breakpoints while the command "hbreak" places a
> > hardware-breakpoint (I am not sure I have figured out the details of the
> > logic in gdb/breakpoint.c) ?
>
> Not 100%. CVS versions of GDB will use hardware breakpoints
> automatically if you try to set them in truly read-only memory.

hrm, I have actually tried to get the cvs version of gdb to use hw
breakpoints using this 'automatic' conversion but failed to ever get it
to trigger. Is there a way to make gdb print the target memory map it
uses to make this decision ? I tried the following:
(gdb) info mem
Using memory regions provided by the target.
There are no memory regions defined.
(gdb)

Which leads me to suspect that my current target (x86 linux FC6) does
not implement this so, the memory region lookup code returns the default
region all the time which contains an RW attr. Is this expected ? Did I
somehow screw up the configuration stage ?

regards,
Mathieu