Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: ppluzhnikov@google.com (Paul Pluzhnikov)
To: gdb-patches@sourceware.org
Subject: [RFA] Fix for failing gdb.base/auxv.exp on Linux
Date: Thu, 17 Jul 2008 20:07:00 -0000	[thread overview]
Message-ID: <20080717200630.1C9DC3A67B6@localhost> (raw)

Greetings,

gdb.base/auxv.exp is failing for me on Linux, because 'info auxv'
from live process prints several trailing AT_NULL entries:

(gdb) inf auxv
32   AT_SYSINFO           Special system info/entry points 0xffffe400
33   AT_SYSINFO_EHDR      System-supplied DSO's ELF header 0xffffe000
...
15   AT_PLATFORM          String identifying platform    0xffffda3b "i686"
0    AT_NULL              End of vector                  0x0
0    AT_NULL              End of vector                  0x0
0    AT_NULL              End of vector                  0x0

Attached patch terminates the list at first AT_NULL, and makes the
test succeed.

Ok to commit?

--
Paul Pluzhnikov


2008-07-17  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* auxv.c (fprint_target_auxv): Stop at AT_NULL.


Index: auxv.c
===================================================================
RCS file: /cvs/src/src/gdb/auxv.c,v
retrieving revision 1.11
diff -u -p -u -r1.11 auxv.c
--- auxv.c	4 May 2008 09:28:27 -0000	1.11
+++ auxv.c	17 Jul 2008 18:57:18 -0000
@@ -246,6 +246,8 @@ fprint_target_auxv (struct ui_file *file
 	  break;
 	}
       ++ents;
+      if (type == AT_NULL)
+	break;
     }
 
   xfree (data);


             reply	other threads:[~2008-07-17 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 20:07 Paul Pluzhnikov [this message]
2008-07-17 20:53 ` Daniel Jacobowitz

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=20080717200630.1C9DC3A67B6@localhost \
    --to=ppluzhnikov@google.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