main: add ctagsBacktrace as a debug helper#4447
Open
masatake wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
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.acchecks 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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
3c9af2d to
eee7577
Compare
Comment on lines
+302
to
+306
| ctags_LDFLAGS = | ||
| if ENABLE_DEBUGGING | ||
| if HAVE_BACKTRACE | ||
| ctags_LDFLAGS += -rdynamic | ||
| endif |
Comment on lines
+209
to
+213
| if ENABLE_DEBUGGING | ||
| if HAVE_BACKTRACE | ||
| libctags_a_CFLAGS += -g | ||
| endif | ||
| endif |
…ting environment" section Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…defs and types" section Signed-off-by: Masatake YAMATO <yamato@redhat.com>
eee7577 to
68a311b
Compare
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>
68a311b to
b3cc6fd
Compare
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.
The function works only if you pass --enable-debugging to ./configure and CFLAGS='-g -O0' to make.