Skip to content

Commit 62bbf40

Browse files
skotopeshedgergsurkov
authored
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>
1 parent feb1b2f commit 62bbf40

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

SConstruct

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,15 @@ firmware_debug = distenv.PhonyTarget(
234234
)
235235
distenv.Depends(firmware_debug, firmware_flash)
236236

237-
distenv.PhonyTarget(
237+
firmware_blackmagic = distenv.PhonyTarget(
238238
"blackmagic",
239239
"${GDBPYCOM}",
240240
source=firmware_env["FW_ELF"],
241241
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
242242
GDBREMOTE="${BLACKMAGIC_ADDR}",
243243
FBT_FAP_DEBUG_ELF_ROOT=firmware_env["FBT_FAP_DEBUG_ELF_ROOT"],
244244
)
245+
distenv.Depends(firmware_blackmagic, firmware_flash)
245246

246247
# Debug alien elf
247248
debug_other_opts = [

scripts/debug/flipperapps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def invoke(self, arg, from_tty):
124124
print(f"Set '{arg}' as debug info lookup path for Flipper external apps")
125125
helper.attach_to_fw()
126126
gdb.events.stop.connect(helper.handle_stop)
127-
gdb.events.exited.connect(helper.handle_exit)
127+
gdb.events.gdb_exiting.connect(helper.handle_exit)
128128
except gdb.error as e:
129129
print(f"Support for Flipper external apps debug is not available: {e}")
130130

0 commit comments

Comments
 (0)