# -*- mode: shell-script -*-
# Copyright (C) 2022-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
# GNU Emacs is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see .
#
# Use 'lldb --local-lldbinit' or add to your ~/.lldbinit the line
#
# settings set target.load-cwd-lldbinit true
#
# Emacs-specific commands start with 'x'. Type 'help' to see all
# commands. Type 'help ' to see help for a command
# .
# Make Python find our files
script -- sys.path.append('../etc')
# Load our Python files
command script import emacs_lldb
# Reload emacs_lldb.py
command alias xreload command script import emacs_lldb
# Print with children provider, depth 2.
command alias xprint frame variable -P 2
# Attach to future Emacs. On a tty, it might be advisable to redirect
# Emacs' stderr to some log file so that one can see the output of
# xdebug_print and other output to stderr.
command alias xattach process attach --waitfor --name emacs --continue
# For tty Emacs
process handle SIGWINCH --pass true --stop false --notify false
process handle SIGINT --pass true --stop false --notify false
b emacs_abort
b die
# end.