Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org, Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: [PATCH v2] Skip vDSO when reading SO list (PR 8882)
Date: Tue, 24 Sep 2013 18:08:00 -0000	[thread overview]
Message-ID: <20130924180715.GA18842@host2.jankratochvil.net> (raw)
In-Reply-To: <87eh8ep0wy.fsf@br87z6lw.de.ibm.com>

On Tue, 24 Sep 2013 19:47:09 +0200, Andreas Arnez wrote:
> ChangeLog:
> 2013-09-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
> 

Add here line:
	PR shlibs/8882
> 	* solib-svr4.c (svr4_read_so_list): Skip the vDSO when reading
> 	link map entries.
> 
> testsuite/ChangeLog:
> 2013-09-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
> 

Add here line:
	PR shlibs/8882
> 	* gdb.base/corefile.exp: Add a check to assure warning-free
> 	core-file load.

OK to check it in with a little update below:


> @@ -1359,8 +1361,16 @@ svr4_read_so_list (CORE_ADDR lm, CORE_AD
>  			  SO_NAME_MAX_PATH_SIZE - 1, &errcode);
>        if (errcode != 0)
>  	{
> -	  warning (_("Can't read pathname for load map: %s."),
> -		   safe_strerror (errcode));
> +	  /* If this entry's l_name address matches that of the
> +	     inferior executable, then this is not a normal shared
> +	     object, but (most likely) a vDSO.  In this case, silently
> +	     skip it; otherwise emit a warning. */
> +	  if (! (first != NULL
> +		 && new->lm_info->l_name == first->lm_info->l_name))

Nested negations were not accepted for GDB before, therefore:
	  if (first == NULL
	      || new->lm_info->l_name != first->lm_info->l_name)

(I agree it had some logic but this was a general GDB list consensus.)


> +	    {

Excessive curly braces.


> +	      warning (_("Can't read pathname for load map: %s."),
> +		       safe_strerror (errcode));
> +	    }
>  	  do_cleanups (old_chain);
>  	  continue;
>  	}


Thanks,
Jan


  reply	other threads:[~2013-09-24 18:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24 17:47 Andreas Arnez
2013-09-24 18:08 ` Jan Kratochvil [this message]
2013-09-25  8:55   ` Andreas Arnez
2013-09-25 11:53     ` Ulrich Weigand

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=20130924180715.GA18842@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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