libpayload/x86/gdb: Migrate to use set_interrupt_handler
BUG=b:109749762 TEST=Verified GDB still functions by hitting Ctrl+G on the developer screen and stepping through some code. Change-Id: I723a8a95f681c500d9d8e35e49fd1d893cb1f133 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://review.coreboot.org/28240 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
80d5c19590
commit
f47ccbdd47
|
@ -38,17 +38,17 @@ static const u8 type_to_signal[] = {
|
|||
[EXC_SX] = GDB_SIGFPE,
|
||||
};
|
||||
|
||||
static int gdb_exception_hook(u32 type)
|
||||
static void gdb_exception_hook(u8 vector)
|
||||
{
|
||||
if (type >= ARRAY_SIZE(type_to_signal) || !type_to_signal[type])
|
||||
return 0;
|
||||
gdb_command_loop(type_to_signal[type]);
|
||||
return 1;
|
||||
gdb_command_loop(type_to_signal[vector]);
|
||||
}
|
||||
|
||||
void gdb_arch_init(void)
|
||||
{
|
||||
exception_install_hook(&gdb_exception_hook);
|
||||
for (int vector = 0; vector < ARRAY_SIZE(type_to_signal); ++vector) {
|
||||
if (type_to_signal[vector])
|
||||
set_interrupt_handler(vector, &gdb_exception_hook);
|
||||
}
|
||||
}
|
||||
|
||||
void gdb_arch_enter(void)
|
||||
|
|
Loading…
Reference in New Issue