Trepan-Debuggers / Trepan-Debuggers/remake

Stepping through macro expansions

Open
#124 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

volunteer wanted if feature is to be added
Dominant language
C
Stars
850
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Related to https://github.com/rocky/remake/issues/123 ,

I want to debug the following Makefile;
the make-dirs call expands to nothing:

define _make-dir
$1/.dum: $(not-dir $1)/.dum
        mkdir $(dir $@)
        touch $(dir $@)/.dum
endef

# we dont try to create/depend on /.dum
define make-dir
$(if $(not-dir $1),$(call _make-dir,$1),)
endef

$(call make-dir,test/)

I've skimmed through the manual earlier and looked through the in-REPL documentation, maybe I'm missing something but

  • I don't see any way to step through macro expansions
  • I don't see a way to dump the contents of the file after expansion
  • are there other techniques for debugging macros?
    Are there any existing solutions to these, or are there features that could be implemented?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides a Makefile example and points to related issue #123 and the in-REPL documentation. Start by reviewing those materials and the requested macro-expansion debugging approaches; the payload does not name implementation files or tests, and completion criteria remain to be defined.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.