From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 20 Apr 2010 02:15:01 -0400 Subject: [U-Boot] [PATCH] KGDB set / remove breakpoints In-Reply-To: References: <1271524811.17655.32.camel@localhost.localdomain> <201004171346.46935.vapier@gentoo.org> Message-ID: <201004200215.02118.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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