kgdb.c (df7686101956929dcea410971656e34926773b88) | kgdb.c (26a04d84bc5311d7785b229b353f327e866ab61a) |
---|---|
1/* 2 * AArch64 KGDB support 3 * 4 * Based on arch/arm/kernel/kgdb.c 5 * 6 * Copyright (C) 2013 Cavium Inc. 7 * Author: Vijaya Kumar K <vijaya.kumar@caviumnetworks.com> 8 * --- 261 unchanged lines hidden (view full) --- 270 return DBG_HOOK_ERROR; 271 272 kgdb_handle_exception(1, SIGTRAP, 0, regs); 273 return DBG_HOOK_HANDLED; 274} 275NOKPROBE_SYMBOL(kgdb_step_brk_fn); 276 277static struct break_hook kgdb_brkpt_hook = { | 1/* 2 * AArch64 KGDB support 3 * 4 * Based on arch/arm/kernel/kgdb.c 5 * 6 * Copyright (C) 2013 Cavium Inc. 7 * Author: Vijaya Kumar K <vijaya.kumar@caviumnetworks.com> 8 * --- 261 unchanged lines hidden (view full) --- 270 return DBG_HOOK_ERROR; 271 272 kgdb_handle_exception(1, SIGTRAP, 0, regs); 273 return DBG_HOOK_HANDLED; 274} 275NOKPROBE_SYMBOL(kgdb_step_brk_fn); 276 277static struct break_hook kgdb_brkpt_hook = { |
278 .esr_mask = 0xffffffff, 279 .esr_val = (u32)ESR_ELx_VAL_BRK64(KGDB_DYN_DBG_BRK_IMM), 280 .fn = kgdb_brk_fn | 278 .fn = kgdb_brk_fn, 279 .imm = KGDB_DYN_DBG_BRK_IMM, |
281}; 282 283static struct break_hook kgdb_compiled_brkpt_hook = { | 280}; 281 282static struct break_hook kgdb_compiled_brkpt_hook = { |
284 .esr_mask = 0xffffffff, 285 .esr_val = (u32)ESR_ELx_VAL_BRK64(KGDB_COMPILED_DBG_BRK_IMM), 286 .fn = kgdb_compiled_brk_fn | 283 .fn = kgdb_compiled_brk_fn, 284 .imm = KGDB_COMPILED_DBG_BRK_IMM, |
287}; 288 289static struct step_hook kgdb_step_hook = { 290 .fn = kgdb_step_brk_fn 291}; 292 293static int __kgdb_notify(struct die_args *args, unsigned long cmd) 294{ --- 32 unchanged lines hidden (view full) --- 327 */ 328int kgdb_arch_init(void) 329{ 330 int ret = register_die_notifier(&kgdb_notifier); 331 332 if (ret != 0) 333 return ret; 334 | 285}; 286 287static struct step_hook kgdb_step_hook = { 288 .fn = kgdb_step_brk_fn 289}; 290 291static int __kgdb_notify(struct die_args *args, unsigned long cmd) 292{ --- 32 unchanged lines hidden (view full) --- 325 */ 326int kgdb_arch_init(void) 327{ 328 int ret = register_die_notifier(&kgdb_notifier); 329 330 if (ret != 0) 331 return ret; 332 |
335 register_break_hook(&kgdb_brkpt_hook); 336 register_break_hook(&kgdb_compiled_brkpt_hook); 337 register_step_hook(&kgdb_step_hook); | 333 register_kernel_break_hook(&kgdb_brkpt_hook); 334 register_kernel_break_hook(&kgdb_compiled_brkpt_hook); 335 register_kernel_step_hook(&kgdb_step_hook); |
338 return 0; 339} 340 341/* 342 * kgdb_arch_exit - Perform any architecture specific uninitalization. 343 * This function will handle the uninitalization of any architecture 344 * specific callbacks, for dynamic registration and unregistration. 345 */ 346void kgdb_arch_exit(void) 347{ | 336 return 0; 337} 338 339/* 340 * kgdb_arch_exit - Perform any architecture specific uninitalization. 341 * This function will handle the uninitalization of any architecture 342 * specific callbacks, for dynamic registration and unregistration. 343 */ 344void kgdb_arch_exit(void) 345{ |
348 unregister_break_hook(&kgdb_brkpt_hook); 349 unregister_break_hook(&kgdb_compiled_brkpt_hook); 350 unregister_step_hook(&kgdb_step_hook); | 346 unregister_kernel_break_hook(&kgdb_brkpt_hook); 347 unregister_kernel_break_hook(&kgdb_compiled_brkpt_hook); 348 unregister_kernel_step_hook(&kgdb_step_hook); |
351 unregister_die_notifier(&kgdb_notifier); 352} 353 354const struct kgdb_arch arch_kgdb_ops; 355 356int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) 357{ 358 int err; --- 16 unchanged lines hidden --- | 349 unregister_die_notifier(&kgdb_notifier); 350} 351 352const struct kgdb_arch arch_kgdb_ops; 353 354int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt) 355{ 356 int err; --- 16 unchanged lines hidden --- |