[U-Boot] [PATCH] KGDB set / remove breakpoints

Mike Frysinger vapier at gentoo.org
Tue Apr 20 08:15:01 CEST 2010


On Monday 19 April 2010 04:54:50 Tonny Tzeng wrote:
> >> Please note, after applying this patch, those architectures, which
> >> already enabled KGDB support, have to create a new asm/kgdb.h and
> >> define the length of the break instruction (BREAK_INSTR_SIZE) in that
> >> file.
> > 
> > i dont think breaking build is a good idea.  i would have the code simply
> > disable itself if BREAK_INSTR_SIZE isnt set.
> 
> That's why I used ifndef in the previous patch, and set
> BREAK_INSTR_SIZE to 4 if it isn't set, but I thought you prefer "an
> undefined size should be used as a tip that the arch doesnt yet
> support break points"?

i meant have the functions always return an error.  have the header do:
#ifndef BREAK_INSTR_SIZE
#define BREAK_INSTR_SIZE 0
#endif

and then in gdb_cmd_break(), do something at the top like:
if (BREAK_INSTR_SIZE == 0)
	return;

> In Linux kgdb code, there is an arch independent header file
> include/linux/kgdb.h, which includes arch dependent header asm/kgdb.h.
>  I am trying to include this concept here, unfortunately current
> u-boot code only has linux/kgdb.h, if we want to define arch specific
> code in asm/kgdb.h, we may need to include asm/kgdb.h from
> linux/kgdb.h, so it looks to me it will definitely break other arch,
> do you have any suggestion for that?

just post a patch to add asm/kgdb.h stubs for the few arches that you dont 
implement yourself.  i think only blackfin/i386/ppc support kgdb atm.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100420/e316eefb/attachment.pgp 


More information about the U-Boot mailing list