1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 12:51:22 +04:00

Debug: use proper hook for handle_exit in flipperapps (#3842)

* Debug: use proper hook for handle_exit in flipperapps
* fbt: flash firmware for `blackmagic` target

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
This commit is contained in:
あく
2024-09-06 03:55:43 +09:00
committed by GitHub
parent feb1b2f349
commit 62bbf406be
2 changed files with 3 additions and 2 deletions

View File

@@ -234,7 +234,7 @@ firmware_debug = distenv.PhonyTarget(
) )
distenv.Depends(firmware_debug, firmware_flash) distenv.Depends(firmware_debug, firmware_flash)
distenv.PhonyTarget( firmware_blackmagic = distenv.PhonyTarget(
"blackmagic", "blackmagic",
"${GDBPYCOM}", "${GDBPYCOM}",
source=firmware_env["FW_ELF"], source=firmware_env["FW_ELF"],
@@ -242,6 +242,7 @@ distenv.PhonyTarget(
GDBREMOTE="${BLACKMAGIC_ADDR}", GDBREMOTE="${BLACKMAGIC_ADDR}",
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"], FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
) )
distenv.Depends(firmware_blackmagic, firmware_flash)
# Debug alien elf # Debug alien elf
debug_other_opts = [ debug_other_opts = [

View File

@@ -124,7 +124,7 @@ class SetFapDebugElfRoot(gdb.Command):
print(f"Set '{arg}' as debug info lookup path for Flipper external apps") print(f"Set '{arg}' as debug info lookup path for Flipper external apps")
helper.attach_to_fw() helper.attach_to_fw()
gdb.events.stop.connect(helper.handle_stop) gdb.events.stop.connect(helper.handle_stop)
gdb.events.exited.connect(helper.handle_exit) gdb.events.gdb_exiting.connect(helper.handle_exit)
except gdb.error as e: except gdb.error as e:
print(f"Support for Flipper external apps debug is not available: {e}") print(f"Support for Flipper external apps debug is not available: {e}")