Skip to content

main: add ctagsBacktrace as a debug helper#4447

Open
masatake wants to merge 3 commits into
universal-ctags:masterfrom
masatake:main--backtrace
Open

main: add ctagsBacktrace as a debug helper#4447
masatake wants to merge 3 commits into
universal-ctags:masterfrom
masatake:main--backtrace

Conversation

@masatake

Copy link
Copy Markdown
Member

The function works only if you pass --enable-debugging to ./configure and CFLAGS='-g -O0' to make.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a ctagsBacktrace() debug helper intended to print a stack trace when built with --enable-debugging, and wires up basic configure/make detection for backtrace() support.

Changes:

  • Add ctagsBacktrace() declaration/definition in the debug module.
  • Add configure.ac checks and an Automake conditional for backtrace availability.
  • Add build flags intended to enable symbolized backtraces when available.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
Makefile.am Adds conditional debug/backtrace-related build flags.
main/debug.h Exposes the new ctagsBacktrace() prototype under DEBUG.
main/debug.c Implements ctagsBacktrace() and adds an execinfo include.
configure.ac Detects backtrace() and defines an Automake conditional.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main/debug.c Outdated
Comment thread main/debug.c Outdated
Comment thread configure.ac Outdated
Comment thread Makefile.am
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.98%. Comparing base (7cef080) to head (b3cc6fd).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
main/debug.c 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4447      +/-   ##
==========================================
- Coverage   85.99%   85.98%   -0.01%     
==========================================
  Files         255      255              
  Lines       63935    63942       +7     
==========================================
  Hits        54978    54978              
- Misses       8957     8964       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masatake masatake force-pushed the main--backtrace branch 2 times, most recently from 3c9af2d to eee7577 Compare June 17, 2026 08:19
@masatake masatake requested a review from Copilot June 17, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread Makefile.am
Comment on lines +302 to +306
ctags_LDFLAGS =
if ENABLE_DEBUGGING
if HAVE_BACKTRACE
ctags_LDFLAGS += -rdynamic
endif
Comment thread Makefile.am
Comment on lines +209 to +213
if ENABLE_DEBUGGING
if HAVE_BACKTRACE
libctags_a_CFLAGS += -g
endif
endif
Comment thread main/debug.c Outdated
Comment thread configure.ac Outdated
masatake added 2 commits June 17, 2026 23:14
…ting environment" section

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…defs and types" section

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
The function works only if you pass --enable-debugging to ./configure
and CFLAGS='-g -O0' to the command line of make.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

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