OpenCores
Issue List
Why gdb 6.8 increases the value read from OR1K_DCFGR_SPRNUM? #73
Closed hekfan opened this issue over 14 years ago
hekfan commented over 14 years ago

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?

jeremybennett commented over 14 years ago
<p> Hi hekfan, </p> <p> I'll investigate this and fix when I release GDB 7.0 next year. </p> <p> Jeremy </p> <p> -- <br /> Tel: +44 (1590) 610184<br /> Cell: +44 (7970) 676050<br /> SkypeID: jeremybennett<br /> Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br /> Web: <a href="http://www.embecosm.com">www.embecosm.com</a> </p>
jeremybennett was assigned over 14 years ago
hslee92 commented over 14 years ago

"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

jeremybennett commented over 14 years ago
<p> Hi Hoosung, Hefkan, </p> <p> Thanks for your insight. Now you remind me, I remember changing this code, for exactly the reason you identify. </p> <p> The solution is to tell GDB not to use hardware breakpoints. For remote debugging, you can do this with. </p> <ul> <pre> set remote hardware-breakpoint-limit 0 </pre> </ul> <p> You may also want to disable hardware watchpoints at the same time: </p> <ul> <pre> set remote hardware-watchpoint-limit 0 </pre> </ul> <p> Let me know if this solves the problem. </p> <p> Jeremy </p> <p> -- <br /> Tel: +44 (1590) 610184<br /> Cell: +44 (7970) 676050<br /> SkypeID: jeremybennett<br /> Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br /> Web: <a href="http://www.embecosm.com">www.embecosm.com</a> </p>
jeremybennett commented about 14 years ago
<p> I have heard no more, so I assume my advice solves the problem. Marking bug as closed. </p>
jeremybennett closed this about 14 years ago

Assignee
jeremybennett
Labels
Request