Replace hardcoded hexadecimal breakpoint value in arch_kgdb_breakpoint() by the KGDB_COMPILED_BREAK macro, stringified.
Signed-off-by: Vincent Stehlé <[email protected]> Cc: Jason Wessel <[email protected]> Cc: [email protected] --- Hi, I propose the following change, which is a bit more than cosmetic as it allows to keep the compiled break definition and its use more in sync. Besides, this should help in handling thumb2 kernel properly in the future as I expect the compiled break definition to be different depending on thumb2 / not thumb2. (Thanks to Joe Perches for the __stringify() tips.) Best regards, V. arch/arm/include/asm/kgdb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/kgdb.h b/arch/arm/include/asm/kgdb.h index 62e3d0a..20e3e38 100644 --- a/arch/arm/include/asm/kgdb.h +++ b/arch/arm/include/asm/kgdb.h @@ -11,6 +11,7 @@ #define __ARM_KGDB_H__ #include <linux/ptrace.h> +#include <linux/stringify.h> /* * GDB assumes that we're a user process being debugged, so @@ -40,7 +41,7 @@ static inline void arch_kgdb_breakpoint(void) { - asm(".word 0xe7ffdeff"); + asm(".word " __stringify(KGDB_COMPILED_BREAK)); } extern void kgdb_handle_bus_error(void); -- 1.8.1.2 ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Kgdb-bugreport mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
