Skip to content

Commit

Permalink
gh-102654: Insert #line directives in generated_cases.c.h (#102669)
Browse files Browse the repository at this point in the history
This behavior is optional, because in some extreme cases it
may just make debugging harder. The tool defaults it to off,
but it is on in Makefile.pre.in.

Also note that this makes diffs to generated_cases.c.h noisier,
since whenever you insert or delete a line in bytecodes.c,
all subsequent #line directives will change.
  • Loading branch information
gvanrossum authored Mar 15, 2023
1 parent 61b9ff3 commit 70185de
Show file tree
Hide file tree
Showing 3 changed files with 530 additions and 16 deletions.
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ regen-cases:
PYTHONPATH=$(srcdir)/Tools/cases_generator \
$(PYTHON_FOR_REGEN) \
$(srcdir)/Tools/cases_generator/generate_cases.py \
--emit-line-directives \
-o $(srcdir)/Python/generated_cases.c.h.new \
-m $(srcdir)/Python/opcode_metadata.h.new \
$(srcdir)/Python/bytecodes.c
Expand Down
Loading

0 comments on commit 70185de

Please sign in to comment.