Skip to content

Commit

Permalink
[debug] Split BASE_ARGUMENTS from CXREF so that gdb/lldb targets work
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed Jun 12, 2024
1 parent fe76ed4 commit afdb074
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Makefile.boilerplate
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ include ../Makefile.messages

# You can override which c-xref to run, but each test need to define ARGUMENTS
# and can use $(COMMAND)
CXREF = ../../src/c-xref -xrefrc .c-xrefrc -p $(CURDIR)
COMMAND = $(CXREF) $(ARGUMENTS)
CXREF = ../../src/c-xref
BASE_ARGUMENTS = -xrefrc .c-xrefrc -p $(CURDIR)
COMMAND = $(CXREF) $(BASE_ARGUMENTS) $(ARGUMENTS)

# Define the test name as the directory name
TEST = $(shell basename '$(CURDIR)')
Expand Down Expand Up @@ -69,7 +70,7 @@ coverage:
# Targets for debugging with gdb or lldb, so far only works for tests
# that do not use the server driver
gdb:
gdb $(CXREF) -ex 'br main' -ex 'run $(ARGUMENTS)'
gdb $(CXREF) -ex 'br main' -ex 'run $(BASE_ARGUMENTS) $(ARGUMENTS)'

lldb:
lldb -o 'breakpoint set --name main' -o 'process launch -- $(ARGUMENTS)' $(CXREF)
lldb -o 'breakpoint set --name main' -o 'process launch -- $(BASE_ARGUMENTS) $(ARGUMENTS)' $(CXREF)

0 comments on commit afdb074

Please sign in to comment.