Re: GDB: Recommends vs. Suggests and abrt->gdb->gcc dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unfortunately if you will put Suggests - DNF will use it for
"priority", not as recommending some package to install. It will stay
as this for quite some time..

>From GUI you can use PackageKit (via DBus), same you can do from
terminal to ask for installing package.

On Sat, Sep 10, 2016 at 10:49 PM, Jan Kratochvil
<jan.kratochvil@xxxxxxxxxx> wrote:
> Hi,
>
> there have been submitted these Bugs:
>         Drop the gcc dependency
>         https://bugzilla.redhat.com/show_bug.cgi?id=1195005
>         gdb pulls in devel packages (gcc, kernel-headers, etc.) [former Summary]
>         https://bugzilla.redhat.com/show_bug.cgi?id=1306591
>
> due to recent GDBs having new:
>         Recommends: gcc-gdb-plugin%{?_isa}
> which brings in the whole GCC compiler.  Reasons for this new Recommends are
> at the bottom of this mail labeled: Why to use gcc-gdb-plugin
>
> Given that ABRT is installed by default and ABRT
>         Requires: gdb
> this dependency installs GCC now even on servers and end-user machines (AFAIK,
> I haven't tried that but it does make sense).
>
> I believe that from the error message:
>         (gdb) compile print EXPRESSION
>         Could not load libcc1.so: libcc1.so: cannot open shared object file: No such file or directory
> a Fedora user does not realize s/he should run:
>         # dnf install gcc-gdb-plugin
> Which is why I made it Recommends and not Suggests.  Also in the close future
> GDB will provide more functional
>         (gdb) print EXPRESSION
> feature only with gcc-gdb-plugin installed.  Just ABRT does not need
> 'print EXPRESSION' to use gcc-gdb-plugin but I guess any user running GDB
> interatively does use 'print EXPRESSION'.
>
> Unrelated to gcc-gdb-plugin there is already this 'dnf'-suggesting GDB message:
>         $ gdb -q true
>         Missing separate debuginfos, use: dnf debuginfo-install coreutils-8.25-14.fc25.x86_64
>         (gdb) _
>
> Therefore I could patch Fedora GDB to also print instead:
>         (gdb) compile print EXPRESSION
>         Missing compiler, use: dnf install gcc-gdb-plugin
>
> But that debuginfo-install command is already wrong on its own, despite Fedora
> GDB prints that for 8 years now (sure with yum before).  One inconvenience is
> that one has to copy-paste it, instead of just some YES confirmation to run
> that command.  But GUI users probably do not want to run 'dnf' from a shell
> - they want to run some GUI package manager instead (I do not know which one).
>
> One can also see that such message does not work for GUI frontends of GDB:
>         $ cdtdebug -e true
> If you do not have coreutils-debuginfo.rpm installed then Eclipse will print
> just:
>         No source available for "main() at 0x555555557480"
> without any hint one could run debuginfo-install to fix that.
>
> Another possibility is to change ABRT so that it only Suggests GDB and ABRT
> provides some user interface to install gdb.rpm upon demand:
>         https://bugzilla.redhat.com/show_bug.cgi?id=1195005#c18
> This just moves this problem from GDB to ABRT.
>
> As a summary: Is there a 'sudo dnf install' (and 'sudo dnf debuginfo-install')
> like command which does use GUI package manager if $DISPLAY is available?
> GDB could also run some different command if $DISPLAY is available.
> Is this the recommended solution?  Or should I submit a FESCo ticket?
>
>
> Thanks,
> Jan
>
> ------------------------------------------------------------------------------
> Why to use gcc-gdb-plugin:
>
> The primary goal is to support complex expressions needed for C++ debugging.
> Unfortunately current GDB does not yet support gcc-gdb-plugin for C++,
> currently only C is supported.  Therefore providing a usecase for C below.
> More thorough background about C++ can be found at:
>         https://sourceware.org/gdb/wiki/GCCCompileAndExecute#History_and_Genesis
>
> gcc-gdb-plugin is now required for
>         (gdb) compile print ...
> such as:
>         echo -e '#include <math.h>\nint main(){return (int)HUGE_VAL;}' >1.c|gcc -Wall -g3 1.c;gdb -q ./a.out -ex start
>         Reading symbols from ./a.out...done.
>         Temporary breakpoint 1 at 0x4004aa: file 1.c, line 2.
>         Starting program: /tmp/a.out
>         Temporary breakpoint 1, main () at 1.c:2
>         2       int main(){return (int)HUGE_VAL;}
>         (gdb) info macro HUGE_VAL
>         Defined at /usr/include/bits/huge_val.h:27
>           included at /usr/include/math.h:36
>           included at /tmp/1.c:1
>         #define HUGE_VAL (__builtin_huge_val())
> ->
>         (gdb) print HUGE_VAL
>         No symbol "__builtin_huge_val" in current context.
> vs.
>         (gdb) compile print HUGE_VAL
>         $1 = inf
>
> Without gcc-gdb-plugin GDB would print only:
>         (gdb) compile print HUGE_VAL
>         Could not load libcc1.so: libcc1.so: cannot open shared object file: No such file or directory
>
> Additionally it is expected that future GDB will use
>         (gdb) compile print EXPRESSION
> for any use of:
>         (gdb) compile EXPRESSION
> --
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxxx
> https://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx



-- 
-Igor Gnatenko
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux