[PATCH] h8300 target breakpoint doesn't work on Simulator

Mike Frysinger vapier@gentoo.org
Fri Mar 4 21:11:00 GMT 2011


On Friday, March 04, 2011 11:38:42 Yoshinori Sato wrote:
> h8300-elf simulator handling O_BPT instruction of breakpoint.
> But gdb write to O_SLEEP instruction of breakpoint.
> 
> So breakpoint command doesn't work on h8300 simulator.
> 
> --- h8300-tdep.c	25 Jan 2011 12:13:20 -0000	1.128
> +++ h8300-tdep.c	4 Mar 2011 16:31:41 -0000
> @@ -1197,8 +1197,7 @@
>  h8300_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
>  			  int *lenptr)
>  {
> -  /*static unsigned char breakpoint[] = { 0x7A, 0xFF }; *//* ??? */
> -  static unsigned char breakpoint[] = { 0x01, 0x80 };	/* Sleep */
> +  static unsigned char breakpoint[] = { 0x7A, 0xFF };	/* bpt (only
> simulator) */

this sounds like you're fixing one system (sim) at the cost of breaking others 
(everyone else).  this func is used by all h8300 targets ... not just sim.  so 
are you sure this is what you want ?

try looking at the Blackfin tdep to see how we handle sim-specific bp's.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110304/228e702c/attachment.sig>


More information about the Gdb-patches mailing list