Re: [PATCH V9 15/21] csky: Debug and Ptrace GDB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 17, 2018 at 05:46:56PM +0200, Arnd Bergmann wrote:
> On Tue, Oct 16, 2018 at 5:06 AM Guo Ren <ren_guo@xxxxxxxxx> wrote:
> >
> > This patch adds arch ptrace implementation, stack dump and bug.h.
> >
> > Signed-off-by: Guo Ren <ren_guo@xxxxxxxxx>
> > Cc: Arnd Bergmann <arnd@xxxxxxxx>
> 
> Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
> 
> > diff --git a/arch/csky/include/asm/bug.h b/arch/csky/include/asm/bug.h
> > new file mode 100644
> > index 0000000..bd7b323
> > --- /dev/null
> > +++ b/arch/csky/include/asm/bug.h
> > @@ -0,0 +1,26 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
> > +
> > +#ifndef __ASM_CSKY_BUG_H
> > +#define __ASM_CSKY_BUG_H
> > +
> > +#include <linux/compiler.h>
> > +#include <linux/const.h>
> > +#include <linux/types.h>
> > +
> > +#define BUG()                          \
> > +do {                                   \
> > +       asm volatile ("bkpt\n");        \
> > +       unreachable();                  \
> > +} while (0)
> 
> Since you have a breakpoint instruction, a nice addition might
> be to use that for implementing WARN_ON as well, whenever you
> get around to doing that. It's certainly not required for the initial
> merge.
Thx for remind and I'll improve it next.

Best Regards
 Guo Ren



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux