Bug 1705087
| Summary: | Please, update cgdb to 0.7.0 (released 2 years ago) | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jan Pokorný [poki] <jpokorny> |
| Component: | cgdb | Assignee: | Gilboa Davara <gilboad> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | fabrice, gilboad, richard.russon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | cgdb-0.6.8-13.fc30 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-07-23 01:07:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jan Pokorný [poki]
2019-05-01 12:46:10 UTC
Hello, 0.7 is missing major functionality present in the 0.6.8, namely TTY support. https://groups.google.com/forum/#!topic/cgdb-dev/m_FMkda4Ua8 If exporting TERM=dumb is all that is needed, I prefer patching 0.6.8 over using 0.7. - Gilboa Hm, I now see that it wasn't the case of sleeping Fedora maintainer but
a deliberate choice. Thanks for explanation, and my sympathies for the
current state that doesn't accommodate some use cases it used to.
The best compromise I could come up with to handle this, free of any
patching (which I perceive as a last resort):
cat /etc/gdbinit.d/cgdb.gdb
> shell readlink /proc/$$/fd/* | grep -q cgdb_log && printf '%s\n%s\n' "set style enabled off" "shell truncate -s0 ~/.cgdb/gdbinit" > ~/.cgdb/gdbinit || truncate -s0 ~/.cgdb/gdbinit
> source ~/.cgdb/gdbinit
Provided that it works (haven't actually downgraded back, but behaved
as expected with 0.7.0) without any interferences (at worst, colours
will be disabled with a regular gdb sessions if one happens to debug
something with "cgdb_log" in the name or so), could such a file be
shipped with currently packaged version of cgdb, then?
Sadly, while the above workaround is nicely self-contained and worked, I cannot recommend it unconditionally -- there's a sife effect of the portion of other (Fedora/EL-specific) "post-processing hook" being dropped: - under gdb: > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00000000004c8bb3 in strcoll () > Missing separate debuginfos, use: dnf debuginfo-install busybox-1.28.3-3.fc30.x86_64 > (gdb) - under cgdb: > Program terminated with signal SIGSEGV, Segmentation fault. > #0 > (gdb) That may be a bug of gdb on it's own that it's prone to forget about commands to execute, and for me, it's less intrusive that having to disable "style" each time around, but thought I'd share this finding. re [comment 3]: > Sadly, while the above workaround is nicely self-contained and worked, > I cannot recommend it unconditionally -- there's a sife effect of > the portion of other (Fedora/EL-specific) "post-processing hook" being > dropped: To make it more interesting, I stand corrected per more observations, it happens only under rather rare circumstances, so perhaps it's still a viable solution for now? Now that I've finally switched to F30, I'm seeing the same. AFAIK, adding 'set style enabled off' to ~/.gdbinit solves the problem. I'll see if I can somehow change the cgdb code to inject this line. - Gilboa Note that while that'd be a solution of the first choice, it's not so great for people flipping between both cgdb and plain gdb. That's what I tried address with the proposed solution in [comment 2]. Hmm, actually two corrections, replace s/cgdb_log/tgdb_log/ in the gdb script from [comment 2] (accidentally, I tested that with cgdb 0.7.0, but it works also with older, currently packaged version when such change is made). And the other is that my observations regarding missing "[...] use: dnf debuginfo-install [...]" messages were also only relevant to 0.7.0, it's just fine with cgdb-0.6.8-12.fc31.x86_64. All in all, unless cgdb is updated 0.7.0, all should be fine with the proposed /etc/gdbinit.d/cgdb.gdb script (after the correction per above). Hello, Sorry for the long AFK. I finally managed to free some time to work on it. I must admit solution #2 doesn't make me feel comfortable, as it changes/overwrites the user's gdbinit. I've began looking at the code, and it seems that I can 'set style enabled off' without it. I'll keep you posted. - Gilboa *** Bug 1720851 has been marked as a duplicate of this bug. *** --- /home/gilboa/work/fedora/cgdb/f30/cgdb.spec 2019-07-01 14:27:50.344421213 +0300
+++ SPECS/cgdb.spec 2019-07-04 16:43:51.197166843 +0300
@@ -1,12 +1,13 @@
Name: cgdb
Version: 0.6.8
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: CGDB is a curses-based interface to the GNU Debugger (GDB)
License: GPLv2
URL: http://cgdb.sourceforge.net/
Source0: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
Source1: http://cgdb.sourceforge.net/cgdb.png
+Patch0: disable_style.patch
BuildRequires: gcc
BuildRequires: readline-devel
@@ -31,6 +32,7 @@
%prep
%setup -q
+%patch0 -p2 -b .disable_shell_style
%build
@@ -54,6 +56,9 @@
%{_mandir}/man1/cgdb.1.gz
%changelog
+* Thu Jul 4 2019 Gilboa Davara <gilboad [AT] gmail.com> - 0.6.8-12
+- Automatically disable gdb's shell style.
+
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain> - 0.6.8-11
- Rebuild for readline 8.0
--- BUILD/cgdb-0.6.8/lib/util/fork_util.c.disable_shell_style 2014-07-23 04:43:00.000000000 +0300
+++ BUILD/cgdb-0.6.8/lib/util/fork_util.c 2019-07-04 16:42:04.749828019 +0300
@@ -187,10 +187,12 @@
const char *const NW = "--nw";
const char *const X = "-x";
const char *const ANNOTATE_TWO = "--annotate=2";
+ const char *const DISABLE_STYLE_P = "-init-eval-command";
+ const char *const DISABLE_STYLE_V = "set style enabled off";
const char *const GDBMI = "-i=mi2";
char *F = filename;
char **local_argv;
- int i, j = 0, extra = 6;
+ int i, j = 0, extra = 8;
int malloc_size = argc + extra;
char slavename[64];
int masterfd;
@@ -203,6 +205,10 @@
else
local_argv[j++] = cgdb_strdup(GDB);
+ /* Gilboa: Disable extended shell style. */
+ local_argv[j++] = cgdb_strdup(DISABLE_STYLE_P);
+ local_argv[j++] = cgdb_strdup(DISABLE_STYLE_V);
+
/* NOTE: These options have to come first, since if the user
* typed '--args' to GDB, everything at the end of the
* users options become parameters to the inferior.
Seems to work for me. Anyone feel like testing before I commit? - Gilboa FEDORA-2019-4522aec0c4 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-4522aec0c4 cgdb-0.6.8-13.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-4522aec0c4 cgdb-0.6.8-13.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. |