[U-Boot] [PATCH] Add KGDB support for ARM platforms

Mike Frysinger vapier at gentoo.org
Thu Apr 8 23:36:38 CEST 2010


On Thursday 08 April 2010 05:40:02 Tonny Tzeng wrote:
> --- a/common/kgdb.c
> +++ b/common/kgdb.c
> @@ -220,6 +220,29 @@ hexToInt(char **ptr, int *intValue)
>        return (numChars);
>  }
> 
> +/* Handle the 'z' or 'Z' breakpoint remove or set packets */
> +static void gdb_cmd_break(kgdb_data *kdp)

this breakpoint support isnt related to ARM KGDB at all.  it should be split 
into a separate changeset.

>        if (kgdb_setjmp(error_jmp_buf) != 0)
>                panic("kgdb: error or fault in entry init!\n");
> 
> +       memset(&kd, 0, sizeof(kgdb_data));

there is no logic as to why this is needed.  should probably be a different 
changeset too.  personally, i'd also use sizeof(kd).

> --- a/include/kgdb.h
> +++ b/include/kgdb.h
> +#ifndef BREAK_INSTR_SIZE
> +#define BREAK_INSTR_SIZE       4
> +#endif

i'm not sure this makes sense.  every arch should define it themselves.

> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -381,6 +382,11 @@ void start_armboot (void)
>        /* miscellaneous platform dependent initialisations */
>        misc_init_r ();
>  #endif
> +#if defined(CONFIG_CMD_KGDB)
> +       WATCHDOG_RESET();
> +       puts("KGDB:  ");
> +       kgdb_init();
> +#endif

the serial funcs (like puts()) already call the watchdog funcs.  this call is 
spurious.
-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/20100408/f57875cb/attachment.pgp 


More information about the U-Boot mailing list