Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic-slave]: Add remake to debug makefiles #18891

Merged

Conversation

opcoder0
Copy link
Contributor

@opcoder0 opcoder0 commented May 7, 2024

Remake supports GDB style debugging for Makefiles making it easier to traverse complicated Makefiles and stepping through build steps, printing variables etc. It supports most of the well-known GDB commands for breakpoints, printing, stepping etc.

https://bashdb.sourceforge.net/remake/

Why I did it

remake enables developers to debug Makefiles.

Work item tracking

Not applicable

How I did it

Add remake to the apt install list.

How to verify it

Running remake from inside the slave container. For instance, running remake with the -X option starts the debugger.

remake -X -f slave.mk PLATFORM=vs ... EXTRA_DOCKER_TARGETS=docker-ptf.gz buster

will run the Makefile and dump into a prompt for further debugging.

Which release branch to backport (provide reason below if selected)

Not applicable.

Tested branch (Please provide the tested image version)

Not applicable.

Description for the changelog

Add remake to sonic-slave buster, bullseye and bookworm images for easier Makefile debugging

Link to config_db schema for YANG module changes

Not applicable

A picture of a cute animal (not mandatory but encouraged)

remake

* Remake supports GDB style debugging for makefiles making it easier
  to traverse complicated makefiles and stepping through builds
@opcoder0 opcoder0 requested a review from lguohan as a code owner May 7, 2024 05:02
@opcoder0 opcoder0 requested a review from wangxin May 7, 2024 05:02
@opcoder0 opcoder0 self-assigned this May 7, 2024
@wangxin wangxin requested a review from saiarcot895 May 7, 2024 05:06
@opcoder0 opcoder0 removed the request for review from lguohan May 7, 2024 05:14
@lguohan lguohan merged commit 9e2da6d into sonic-net:master May 8, 2024
11 checks passed
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.

2 participants