Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [GDB help] Regarding breakpoint support in ARM
@ 2010-05-31  7:00 Suraj Sivan
  2010-05-31  9:22 ` paawan oza
  0 siblings, 1 reply; 3+ messages in thread
From: Suraj Sivan @ 2010-05-31  7:00 UTC (permalink / raw)
  To: gdb

Hi,

I'm working with GDB and custom GDB Server for debugging ARM. The core
is ARM7TDMI-S which has 2 hardware resources for setting breakpoints.
I am using the option "set breakpoint always-inserted on" so that
whenever I set a breakpoint or watcpoint, GDB will put it immediately
rather than waiting for continue command. After setting three
breakpoints(2 software and 1 hardware), if I try to put a 4th hardware
breakpoint GDB will give a warning as below:

Warning:
Cannot insert hardware breakpoint 4.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Now if I list the breakpoints using "info b" command, GDB displays as below:

 Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x40000010 ../source/armloop.s:8
2       breakpoint     keep y   0x40000020 ../source/armloop.s:12
3       hw breakpoint  keep y   0x40000030 ../source/armloop.s:16
4       hw breakpoint  keep y   0x40000040 ../source/armloop.s:20

Here it is seen that GDB keeps the 4th hardware breakpoint information
in its table. If I give a continue command, GDB will try to put the
4th breakpoint again and gives the same warning as above and gets into
a situation where I have to manually delete the 4th breakpoint to
further continue. Is there an option for GDB to not keep the
information of the particular breakpoint which it gives a warning like
above?

regards
Suraj S


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GDB help] Regarding breakpoint support in ARM
  2010-05-31  7:00 [GDB help] Regarding breakpoint support in ARM Suraj Sivan
@ 2010-05-31  9:22 ` paawan oza
  2010-05-31 10:25   ` Suraj Sivan
  0 siblings, 1 reply; 3+ messages in thread
From: paawan oza @ 2010-05-31  9:22 UTC (permalink / raw)
  To: Suraj Sivan, gdb

Hi,
The moment you give continue, gdb keeps on trying to insert the extra hw breakpoint all the time.
I think, gdb expects you to remove manually and then continue (if you rove previously set hw breakpoint, then it should work also)
I wonder, even after knowing that it can not set extra hw watch-point, due to lack of debug registers, still it goes ahead and set it in its private list, which could be avoided.
(this is the case with x86 also, If I am correct)
Regards,
Oza.



----- Original Message ----
From: Suraj Sivan <suraj.sivan@gmail.com>
To: gdb@sourceware.org
Sent: Mon, May 31, 2010 12:30:05 PM
Subject: [GDB help] Regarding breakpoint support in ARM

Hi,

I'm working with GDB and custom GDB Server for debugging ARM. The core
is ARM7TDMI-S which has 2 hardware resources for setting breakpoints.
I am using the option "set breakpoint always-inserted on" so that
whenever I set a breakpoint or watcpoint, GDB will put it immediately
rather than waiting for continue command. After setting three
breakpoints(2 software and 1 hardware), if I try to put a 4th hardware
breakpoint GDB will give a warning as below:

Warning:
Cannot insert hardware breakpoint 4.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Now if I list the breakpoints using "info b" command, GDB displays as below:

Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x40000010 ../source/armloop.s:8
2       breakpoint     keep y   0x40000020 ../source/armloop.s:12
3       hw breakpoint  keep y   0x40000030 ../source/armloop.s:16
4       hw breakpoint  keep y   0x40000040 ../source/armloop.s:20

Here it is seen that GDB keeps the 4th hardware breakpoint information
in its table. If I give a continue command, GDB will try to put the
4th breakpoint again and gives the same warning as above and gets into
a situation where I have to manually delete the 4th breakpoint to
further continue. Is there an option for GDB to not keep the
information of the particular breakpoint which it gives a warning like
above?

regards
Suraj S



      


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GDB help] Regarding breakpoint support in ARM
  2010-05-31  9:22 ` paawan oza
@ 2010-05-31 10:25   ` Suraj Sivan
  0 siblings, 0 replies; 3+ messages in thread
From: Suraj Sivan @ 2010-05-31 10:25 UTC (permalink / raw)
  To: gdb; +Cc: paawan oza

Hi,

Thanks. This means that the GDB keeps the list of all breakpoints and
watchpoints being set, even if it is not able to set in the actual
hardware due to lack of debug registers. Hope this behavior of GDB is
not correct where even after receiving error in setting breakpoints,
it keeps the information of those breakpoints which returned error in
its private list. Will this be corrected in the next release of GDB?

Is there any option or commands that can be given prior to starting
debugging to avoid keeping these erroneous brekpoints in the list?

regards
Suraj

On Mon, May 31, 2010 at 2:52 PM, paawan oza <paawan1982@yahoo.com> wrote:
> Hi,
> The moment you give continue, gdb keeps on trying to insert the extra hw breakpoint all the time.
> I think, gdb expects you to remove manually and then continue (if you rove previously set hw breakpoint, then it should work also)
> I wonder, even after knowing that it can not set extra hw watch-point, due to lack of debug registers, still it goes ahead and set it in its private list, which could be avoided.
> (this is the case with x86 also, If I am correct)
> Regards,
> Oza.
>
>
>
> ----- Original Message ----
> From: Suraj Sivan <suraj.sivan@gmail.com>
> To: gdb@sourceware.org
> Sent: Mon, May 31, 2010 12:30:05 PM
> Subject: [GDB help] Regarding breakpoint support in ARM
>
> Hi,
>
> I'm working with GDB and custom GDB Server for debugging ARM. The core
> is ARM7TDMI-S which has 2 hardware resources for setting breakpoints.
> I am using the option "set breakpoint always-inserted on" so that
> whenever I set a breakpoint or watcpoint, GDB will put it immediately
> rather than waiting for continue command. After setting three
> breakpoints(2 software and 1 hardware), if I try to put a 4th hardware
> breakpoint GDB will give a warning as below:
>
> Warning:
> Cannot insert hardware breakpoint 4.
> Could not insert hardware breakpoints:
> You may have requested too many hardware breakpoints/watchpoints.
>
> Now if I list the breakpoints using "info b" command, GDB displays as below:
>
> Num     Type           Disp Enb Address    What
> 1       breakpoint     keep y   0x40000010 ../source/armloop.s:8
> 2       breakpoint     keep y   0x40000020 ../source/armloop.s:12
> 3       hw breakpoint  keep y   0x40000030 ../source/armloop.s:16
> 4       hw breakpoint  keep y   0x40000040 ../source/armloop.s:20
>
> Here it is seen that GDB keeps the 4th hardware breakpoint information
> in its table. If I give a continue command, GDB will try to put the
> 4th breakpoint again and gives the same warning as above and gets into
> a situation where I have to manually delete the 4th breakpoint to
> further continue. Is there an option for GDB to not keep the
> information of the particular breakpoint which it gives a warning like
> above?
>
> regards
> Suraj S
>
>
>
>
>
>



-- 
Suraj S,
Lead Engineer,
NeST Pvt. Ltd., A-3, Periyar,Technopark, Trivandrum, Kerala


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-31 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-31  7:00 [GDB help] Regarding breakpoint support in ARM Suraj Sivan
2010-05-31  9:22 ` paawan oza
2010-05-31 10:25   ` Suraj Sivan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox