The openrisc bugtracker has been moved to: bugzilla.opencores.org. This page is read-only
Why gdb 6.8 increases the value read from OR1K_DCFGR_SPRNUM?
Information:
Type :: REQUEST
Status :: CLOSED
Assigned to ::
Jeremy, Bennett
Description:
My chip can only work with gdb 5.0. When use gdb 6.8, break points can't stop the running.
Now I know why. Since my chip has no hardware breakpoint.
gdb 5.0 initializes the num_matchpoints by:
tmp = or1k_read_spr_reg (DCFGR_SPRNUM);
or1k_implementation.num_matchpoints = tmp & 7;
But gdb 6.8 initializes it by:
tmp = or1k_jtag_read_spr (OR1K_DCFGR_SPRNUM);
tdep->num_matchpoints = (tmp & OR1K_SPR_DCFGR_NDP) + 1;
So gdb 6.8 can't set break point properly.
After I modify the last line to:
tdep->num_matchpoints = (tmp & OR1K_SPR_DCFGR_NDP);// + 1;
Gdb 6.8 can also work happily.
Why to increase the value?
Comments:
| Bennett, Jeremy | Apr 20, 2010 |
|---|---|
|
I have heard no more, so I assume my advice solves the problem. Marking bug as closed. |
|
| Bennett, Jeremy | Jan 22, 2010 |
|---|---|
|
Hi Hoosung, Hefkan, Thanks for your insight. Now you remind me, I remember changing this code, for exactly the reason you identify. The solution is to tell GDB not to use hardware breakpoints. For remote debugging, you can do this with. set remote hardware-breakpoint-limit 0 You may also want to disable hardware watchpoints at the same time: set remote hardware-watchpoint-limit 0 Let me know if this solves the problem. Jeremy
-- |
|
| lee, hoosung | Jan 22, 2010 |
|---|---|
|
"OR1K_DCFGR_SPRNUM = 0" means that one hardware matchpoint unit by last openrisc_arch.doc there are no way to represent that debug unit have no hardware matchpoint unit there are need to modify the OR1K_SPR_DCFGR_NDP's meaning page 329 at openrisc_arch.doc ------------------------------ NDP Number of Debug Pairs 0 Debug unit has one DCR/DVR pair … 7 Debug unit has eight DCR/DVR pairs ---------------------------------- |
|
| Bennett, Jeremy | Dec 18, 2009 |
|---|---|
|
Hi hekfan, I'll investigate this and fix when I release GDB 7.0 next year. Jeremy
-- |
|
Post a comment:
Login to post comments!
