From: Doug Evans <xdje42@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch+7.7] Fix auto-load 7.7 regression [Re: [commit 2/2] Move processing of .debug_gdb_scripts to auto-load.c]
Date: Sun, 23 Feb 2014 23:27:00 -0000 [thread overview]
Message-ID: <CAP9bCMRZYAzFvciG6kB0J_hKSMckJEZbQNVBuQmRoHeBWB6VEA@mail.gmail.com> (raw)
In-Reply-To: <20140223212400.GA8831@host2.jankratochvil.net>
On Sun, Feb 23, 2014 at 1:24 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> Hi Doug,
>
> the regression affects any loading from /usr/share/gdb/auto-load .
>
> 5b2bf9471f1499bee578fcd60c05afe85794e280 is the first bad commit
> commit 5b2bf9471f1499bee578fcd60c05afe85794e280
> Author: Doug Evans <xdje42@gmail.com>
> Date: Fri Nov 29 21:29:26 2013 -0800
> Move .debug_gdb_script processing to auto-load.c.
> Simplify handling of auto-loaded objfile scripts.
>
> Fedora 20 x86_64
> $ gdb -q /usr/lib64/libgobject-2.0.so
> Reading symbols from /usr/lib64/libglib-2.0.so.0.3800.2...Reading symbols from /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3800.2.debug...done.
> done.
> (gdb) _
>
> Fedora Rawhide x86_64
> $ gdb -q /usr/lib64/libgobject-2.0.so
> Reading symbols from /usr/lib64/libglib-2.0.so...Reading symbols from /usr/lib/debug/usr/lib64/libglib-2.0.so.0.3990.0.debug...done.
> done.
> warning: File "/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".
> To enable execution of this file add
> add-auto-load-safe-path /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
> line to your configuration file "/home/jkratoch/.gdbinit".
> To completely disable this security protection add
> set auto-load safe-path /
> line to your configuration file "/home/jkratoch/.gdbinit".
> For more information about this security protection see the
> "Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
> info "(gdb)Auto-loading safe path"
> (gdb) _
>
> That is it tries to load "forbidden"
> /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
> but it should load instead
> /usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3990.0-gdb.py*
> Although that is also not exactly this way, there does not exist any
> /usr/lib64/libglib-2.0.so.0.3990.0-gdb.py
> despite regressed GDB says so.
>
>
>
> Regards,
> Jan
>
> gdb/
> 2014-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * auto-load.c (auto_load_objfile_script_1): Change filename to
> debugfile.
>
> gdb/testsuite/
> 2014-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.base/auto-load-script: New file.
> * gdb.base/auto-load.c: New file.
> * gdb.base/auto-load.exp: New file.
Crap. "Sorry about that chief."
I filed this:
https://sourceware.org/bugzilla/show_bug.cgi?id=16626
If we make 7.7.1 this should definitely go in.
Your fix looks fine to me with one nit:
The .exp file is missing a test for native or a call to
gdb_remote_download to download the script.
You might also want to add a test to verify gdb won't load the wrong
file that it's trying to do now.
next prev parent reply other threads:[~2014-02-23 23:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 8:58 [commit 2/2] Move processing of .debug_gdb_scripts to auto-load.c Doug Evans
2014-02-23 21:24 ` [patch+7.7] Fix auto-load 7.7 regression [Re: [commit 2/2] Move processing of .debug_gdb_scripts to auto-load.c] Jan Kratochvil
2014-02-23 23:27 ` Doug Evans [this message]
2014-02-24 9:04 ` [patch+7.7] Fix auto-load 7.7 regression (PR gdb/16626) Jan Kratochvil
2014-02-25 17:41 ` [commit+7.7] " Jan Kratochvil
2014-02-25 19:07 ` Tom Tromey
2014-02-25 19:50 ` [commit#2+7.7] " Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP9bCMRZYAzFvciG6kB0J_hKSMckJEZbQNVBuQmRoHeBWB6VEA@mail.gmail.com \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox