Fix kgdb/kdb to conform to int3 format
Subsystems (2)
PATCH 4/4 Fix kgdb/kdb to conform to int3 format
If a breakpoint is triggered under x86 with an int3 that kdb does not know about, it will report it as a catastrophic error rather than just assuming it was told to enter the debugger.
The macro that defines the kgdb breakpoint also needs to conform to the newer gas format without the numbers.
Signed-off-by Jeffrey Merkey <[email protected]>
--- arch/x86/include/asm/kgdb.h | 2 +- kernel/debug/kdb/kdb_debugger.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/kgdb.h +1 -1
@@ -77,7 +77,7 @@ enum regnames {static inline void arch_kgdb_breakpoint (void ) { - asm(" int $3" ); + asmvolatile ("int3" ); }#define BREAK_INSTR_SIZE 1#define CACHE_FLUSH_IS_SAFE 1
kernel/debug/kdb/kdb_debugger.c +1 -1
@@ -55,7 +55,7 @@ int kdb_stub(struct kgdb_state *ks)int error =0 ;kdb_bp_t *bp;unsigned long addr =kgdb_arch_pc (ks->ex_vector, ks->linux_regs); -kdb_reason_t reason =KDB_REASON_OOPS ; +kdb_reason_t reason =KDB_REASON_KEYBOARD ;kdb_dbtrap_t db_result =KDB_DB_NOBPT ;int i;
Signature · 1 line
1.8.3.1