From 62bbf406be28bd5855a0a160e73e001f40c1d8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=8F?= Date: Fri, 6 Sep 2024 03:55:43 +0900 Subject: [PATCH] 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 Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com> --- SConstruct | 3 ++- scripts/debug/flipperapps.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index b4c8d7b290..1279679688 100644 --- a/SConstruct +++ b/SConstruct @@ -234,7 +234,7 @@ firmware_debug = distenv.PhonyTarget( ) distenv.Depends(firmware_debug, firmware_flash) -distenv.PhonyTarget( +firmware_blackmagic = distenv.PhonyTarget( "blackmagic", "${GDBPYCOM}", source=firmware_env["FW_ELF"], @@ -242,6 +242,7 @@ distenv.PhonyTarget( GDBREMOTE="${BLACKMAGIC_ADDR}", FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"], ) +distenv.Depends(firmware_blackmagic, firmware_flash) # Debug alien elf debug_other_opts = [ diff --git a/scripts/debug/flipperapps.py b/scripts/debug/flipperapps.py index 6dba89a564..81aa43c34c 100644 --- a/scripts/debug/flipperapps.py +++ b/scripts/debug/flipperapps.py @@ -124,7 +124,7 @@ class SetFapDebugElfRoot(gdb.Command): print(f"Set '{arg}' as debug info lookup path for Flipper external apps") helper.attach_to_fw() 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: print(f"Support for Flipper external apps debug is not available: {e}")