Skip to content

Commit

Permalink
Debug: use proper hook for handle_exit in flipperapps (#3842)
Browse files Browse the repository at this point in the history
* Debug: use proper hook for handle_exit in flipperapps
* fbt: flash firmware for `blackmagic` target

Co-authored-by: hedger <[email protected]>
Co-authored-by: Georgii Surkov <[email protected]>
  • Loading branch information
3 people authored Sep 5, 2024
1 parent feb1b2f commit 62bbf40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,15 @@ firmware_debug = distenv.PhonyTarget(
)
distenv.Depends(firmware_debug, firmware_flash)

distenv.PhonyTarget(
firmware_blackmagic = distenv.PhonyTarget(
"blackmagic",
"${GDBPYCOM}",
source=firmware_env["FW_ELF"],
GDBOPTS="${GDBOPTS_BASE} ${GDBOPTS_BLACKMAGIC}",
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 = [
Expand Down
2 changes: 1 addition & 1 deletion scripts/debug/flipperapps.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def invoke(self, arg, from_tty):
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}")

Expand Down

0 comments on commit 62bbf40

Please sign in to comment.