Expand test to not use line number hack#151
Merged
rocky merged 1 commit intoTrepan-Debuggers:remake-4-3from Sep 5, 2023
Merged
Expand test to not use line number hack#151rocky merged 1 commit intoTrepan-Debuggers:remake-4-3from
rocky merged 1 commit intoTrepan-Debuggers:remake-4-3from
Conversation
commit acfaa6f prevented subtracting 1 from unsigned zero floc.lineno after --debugger-stop=load had set b_debugger_goal. But --debugger-stop=full obeys that code as well, so simply test floc.lineno to be nonzero before subtracting. This doesn't affect autotools Makefiles but this generic Makefile displays it: ``` .PHONY: clean SRCS = $(wildcard *.c) PROG = $(shell basename $$PWD) OBJ = $(SRCS:.c=.o) CPPFLAGS = $(shell getconf LFS_CFLAGS 2>/dev/null) CFLAGS := $(CFLAGS) -g3 -gdwarf-4 \ -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes \ -Wmissing-prototypes $(PROG) : $(OBJ) $(CC) $^ -o $@ $(LIBS) clean : rm -f *.o *.d $(PROG) %.d: %.c $(CC) -MM -MT $(@:.d=.o) -MT $@ $(CPPFLAGS) $< -o $@ ifneq ($(MAKECMDGOALS),clean) -include $(SRCS:.c=.d) endif ``` Place this in a directory by itself with any random "hello world" program, remake --debugger-stop=full and step through.
Contributor
Author
|
Hi Rocky, I missed this before, it cropped up during a demo last night. Cheers ... Duncan. |
Collaborator
|
LGTM - thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commit acfaa6f prevented subtracting 1 from unsigned zero floc.lineno after --debugger-stop=load had set b_debugger_goal. But --debugger-stop=full obeys that code as well, so simply test floc.lineno to be nonzero before subtracting. This doesn't affect autotools Makefiles but this generic Makefile displays it:
Place this in a directory by itself with any random "hello world" program, remake --debugger-stop=full and step through.