mirror of
https://github.com/meizu-m86/kexec-tools-arm64
synced 2025-11-04 05:46:10 +08:00
debugging: Add model_brk
This commit is contained in:
@@ -8,4 +8,16 @@ void printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void setup_arch(void);
|
||||
void post_verification_setup_arch(void);
|
||||
|
||||
static inline void model_brk(int line)
|
||||
{
|
||||
asm volatile(
|
||||
"mov x0, #0x18;" /* angel_SWIreason_ReportException */
|
||||
"mov x1, #0x20000;"
|
||||
"add x1, x1, #0x20;" /* ADP_Stopped_BreakPoint */
|
||||
"hlt #0xf000\n" /* A64 semihosting */
|
||||
:
|
||||
: "r" (line)
|
||||
: "x0", "x1");
|
||||
}
|
||||
|
||||
#endif /* PURGATORY_H */
|
||||
|
||||
Reference in New Issue
Block a user