// SPDX-License-Identifier: GPL-2.0-only /* * arch/hexagon/kernel/kgdb.c - Hexagon KGDB Support * * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
*/
/* Not yet working */ void sleeping_thread_to_gdb_regs(unsignedlong *gdb_regs, struct task_struct *task)
{ struct pt_regs *thread_regs;
if (task == NULL) return;
/* Initialize to zero */
memset(gdb_regs, 0, NUMREGBYTES);
/* Otherwise, we have only some registers from switch_to() */
thread_regs = task_pt_regs(task);
gdb_regs[0] = thread_regs->r00;
}
/** * kgdb_arch_handle_exception - Handle architecture specific GDB packets. * @vector: The error vector of the exception that happened. * @signo: The signal number of the exception that happened. * @err_code: The error code of the exception that happened. * @remcom_in_buffer: The buffer of the packet we have read. * @remcom_out_buffer: The buffer of %BUFMAX bytes to write a packet into. * @regs: The &struct pt_regs of the current process. * * This function MUST handle the 'c' and 's' command packets, * as well packets to set / remove a hardware breakpoint, if used. * If there are additional packets which the hardware needs to handle, * they are handled here. The code should return -1 if it wants to * process more packets, and a %0 or %1 if it wants to exit from the * kgdb callback. * * Not yet working.
*/ int kgdb_arch_handle_exception(int vector, int signo, int err_code, char *remcom_in_buffer, char *remcom_out_buffer, struct pt_regs *linux_regs)
{ switch (remcom_in_buffer[0]) { case's': case'c': return 0;
} /* Stay in the debugger. */ return -1;
}
/* * Lowest-prio notifier priority, we want to be notified last:
*/
.priority = -INT_MAX,
};
/** * kgdb_arch_init - Perform any architecture specific initialization. * * This function will handle the initialization of any architecture * specific callbacks.
*/ int kgdb_arch_init(void)
{ return register_die_notifier(&kgdb_notifier);
}
/** * kgdb_arch_exit - Perform any architecture specific uninitalization. * * This function will handle the uninitalization of any architecture * specific callbacks, for dynamic registration and unregistration.
*/ void kgdb_arch_exit(void)
{
unregister_die_notifier(&kgdb_notifier);
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.