public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Gary Benson <gbenson@redhat.com>, gdb-patches@sourceware.org
Cc: "Cédric Buissart" <cedric.buissart@gmail.com>
Subject: Re: [PATCH 5/5] Also look for debug files in gdb_sysroot
Date: Wed, 01 Jul 2015 13:45:00 -0000	[thread overview]
Message-ID: <5593EEFC.4020909@redhat.com> (raw)
In-Reply-To: <1434447768-17328-6-git-send-email-gbenson@redhat.com>

On 06/16/2015 10:42 AM, Gary Benson wrote:
> This commit makes GDB look for separate debug files in gdb_sysroot if
> not found in the currently searched locations.  This allows for easier
> analysis of core files from foreign machines using the sysroot option.
> The user creates or mounts a directory containing the necessary
> binaries and debuginfo and then sets GDB's sysroot to that directory
> before starting their debug session.

Looks fine to me, but I think this should be documented in
the manual, and maybe in the online help somewhere as well?
And NEWS too.

Thanks,
Pedro Alves

> 
> gdb/ChangeLog:
> 
> 	* gdb/symfile.c (find_separate_debug_file): In debugdir loop,
> 	also try alternate directory prefixed with gdb_sysroot.
> ---
>  gdb/ChangeLog |    6 ++++++
>  gdb/symfile.c |   11 +++++++++++
>  2 files changed, 17 insertions(+), 0 deletions(-)
> 
> diff --git a/gdb/symfile.c b/gdb/symfile.c
> index 0cc940a..1cd99ea 100644
> --- a/gdb/symfile.c
> +++ b/gdb/symfile.c
> @@ -1613,6 +1613,7 @@ find_separate_debug_file (const char *dir,
>  
>        if (altdir != NULL)
>  	{
> +	  /* Try in the alternate directory directly.  */
>  	  debugfile = build_debug_file_name (no_prefix, debugdir,
>  					     altdir, debuglink, NULL);
>  	  if (separate_debug_file_exists (debugfile, crc32, objfile))
> @@ -1621,6 +1622,16 @@ find_separate_debug_file (const char *dir,
>  	      return debugfile;
>  	    }
>  	  xfree (debugfile);
> +
> +	  /* Try in the alternate directory in gdb_sysroot.  */
> +	  debugfile = build_debug_file_name (gdb_sysroot, debugdir,
> +					     altdir, debuglink, NULL);
> +	  if (separate_debug_file_exists (debugfile, crc32, objfile))
> +	    {
> +	      do_cleanups (back_to);
> +	      return debugfile;
> +	    }
> +	  xfree (debugfile);


  reply	other threads:[~2015-07-01 13:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16  9:42 [PATCH 0/5] Separate debugfile improvements Gary Benson
2015-06-16  9:42 ` [PATCH 1/5] Introduce build_debug_file_name Gary Benson
2015-06-16 14:47   ` Eli Zaretskii
2015-06-17  9:47     ` Gary Benson
2015-06-17 16:42       ` Eli Zaretskii
2015-06-18 10:55         ` Gary Benson
2015-06-18 12:11           ` Eli Zaretskii
2015-06-19  8:32             ` Gary Benson
2015-07-01 11:05   ` Pedro Alves
2015-07-02 11:18     ` Gary Benson
2015-07-02 11:38       ` Pedro Alves
2015-07-02 13:53         ` Gary Benson
2015-07-25 16:20   ` Jan Kratochvil
2015-06-16  9:42 ` [PATCH 3/5] Update how find_separate_debug_file handles CANON_DIR argument Gary Benson
2015-07-01 11:13   ` Pedro Alves
2015-06-16  9:42 ` [PATCH 2/5] Pre-strip now-unnecessary trailing directory separators Gary Benson
2015-07-01 13:45   ` Pedro Alves
2015-06-16  9:48 ` [PATCH 4/5] Add "target:" filename handling to find_separate_debug_file Gary Benson
2015-07-01 13:35   ` Pedro Alves
2015-07-23 14:33     ` Gary Benson
2015-07-24 10:28       ` Gary Benson
2015-07-24 11:54         ` Gary Benson
2015-07-25 18:15   ` Jan Kratochvil
2015-06-16  9:50 ` [PATCH 5/5] Also look for debug files in gdb_sysroot Gary Benson
2015-07-01 13:45   ` Pedro Alves [this message]
2015-06-23  8:44 ` [PING][PATCH 0/5] Separate debugfile improvements Gary Benson

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=5593EEFC.4020909@redhat.com \
    --to=palves@redhat.com \
    --cc=cedric.buissart@gmail.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).