Skip to content

Automate LLDB setup generation via make target#29

Open
zbelinsk wants to merge 3 commits into
masterfrom
automate_lldb_setup_creation
Open

Automate LLDB setup generation via make target#29
zbelinsk wants to merge 3 commits into
masterfrom
automate_lldb_setup_creation

Conversation

@zbelinsk
Copy link
Copy Markdown
Contributor

  • Replace static lldb-setup with generated version, configuring user-based paths
  • Add scripts/Makefile.lldb_setup to support automated creation
  • Update makefile to include 'make lldb-setup, lldb-setup-clean'
  • Update .gitignore to ignore stale "lldb-setup"
  • Deleted stale "lldb-setup" file from root

Usage:

  • Run 'make lldb-setup' to generate LLDB setup file automatically
  • Run 'make lldb-setup-clean' to remove generated artifacts

Copy link
Copy Markdown
Contributor

@stzahi1 stzahi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Comment thread scripts/Makefile.lldb_setup Outdated
@@ -0,0 +1,23 @@
THIS_MK := $(lastword $(MAKEFILE_LIST))
H2DIR := $(abspath $(dir $(THIS_MK))/..)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

H2DIR is provided by upper level makefile, please use it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread makefile

LLDB_PORT ?= 1234

.PHONY: lldb-setup lldb-setup-clean
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need here .PHONY ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we previously built "lldb-setup" with port 1234 and later wanted to change port from 1234 to 6789, we want to rewrite the file all over, though it exists in project already. Potentially we could cache the current port in other file, thought it was an overkill.

Comment thread makefile
lldb-setup:
$(MAKE) -f scripts/Makefile.lldb_setup LLDB_PORT=$(LLDB_PORT)

lldb-setup-clean:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear for me what is the clean flow here? Does 'make clean' remove the file ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to remove it on 'make clean' since it is not a target/archv dependent, the path always stays fixed.
lldb-setup line was added to .gitignore so we won't leave a stale copy on GitHub.

zbelinsk added 3 commits May 26, 2026 10:11
- Replace static lldb-setup with generated version
- Add scripts/Makefile.lldb_setup to support automated creation
- Update makefile to include 'make lldb-setup' and clean handling
- Update .gitignore accordingly

Usage:
- Run 'make lldb-setup' to generate LLDB setup file automatically
- Run 'make lldb-setup-clean' to remove generated artifacts

Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
Remove redundant variable definitions (already defined in earlier Makefile workflow)


Signed-off-by: zbelinsk <zbelinsk@qti.qualcomm.com>
Update docs for lldb usage.

Signed-off-by: zbelinsk <zbelinsk@qti.qualcomm.com>
@zbelinsk zbelinsk force-pushed the automate_lldb_setup_creation branch from 6271dba to 9bcc99e Compare May 26, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants