Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: Prelink.exp troubles
Date: Thu, 09 Mar 2006 04:40:00 -0000	[thread overview]
Message-ID: <oru0a8sc3b.fsf@free.oliva.athome.lsd.ic.unicamp.br> (raw)
In-Reply-To: <20060307172307.GA1474@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 7 Mar 2006 12:23:08 -0500")

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

On Mar  7, 2006, Daniel Jacobowitz <drow@false.org> wrote:

> On Tue, Mar 07, 2006 at 02:02:40AM -0300, Alexandre Oliva wrote:

>> Here's what I'm checking in, in the hopes that the archoring you
>> suggested above is not needed, otherwise I'll take care of it in a
>> subsequent patch.

> Please fix the anchoring.

In the following patch, that I'm checking in as obvious, I fix
anchoring and also tidy up some code added in the original prelink
patch, such that it's absolutely obvious that the l_addr field is
properly initialized in all cases.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb-prelink-tweak-more.patch --]
[-- Type: text/x-patch, Size: 1972 bytes --]

for gdb/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* solib-svr4.c (svr4_current_sos): Move up initialization of
	l_addr, such that it clearly covers all cases.

for gdb/testsuite/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* gdb.base/prelink.exp: Anchor tested-for regular expression
	on gdb prompt.

Index: gdb/solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.56
diff -u -p -r1.56 solib-svr4.c
--- gdb/solib-svr4.c 28 Feb 2006 04:28:47 -0000 1.56
+++ gdb/solib-svr4.c 9 Mar 2006 00:07:26 -0000
@@ -704,6 +704,7 @@ svr4_current_sos (void)
       new->lm_info = xmalloc (sizeof (struct lm_info));
       make_cleanup (xfree, new->lm_info);
 
+      new->lm_info->l_addr = (CORE_ADDR)-1;
       new->lm_info->lm = xzalloc (lmo->link_map_size);
       make_cleanup (xfree, new->lm_info->lm);
 
@@ -744,8 +745,6 @@ svr4_current_sos (void)
 	    free_so (new);
 	  else
 	    {
-	      new->lm_info->l_addr = (CORE_ADDR)-1;
-
 	      new->next = 0;
 	      *link_ptr = new;
 	      link_ptr = &new->next;
Index: gdb/testsuite/gdb.base/prelink.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/prelink.exp,v
retrieving revision 1.2
diff -u -p -r1.2 prelink.exp
--- gdb/testsuite/gdb.base/prelink.exp 7 Mar 2006 05:05:29 -0000 1.2
+++ gdb/testsuite/gdb.base/prelink.exp 9 Mar 2006 00:07:26 -0000
@@ -103,8 +103,9 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
 set test "prelink"
+global gdb_prompt
 gdb_test_multiple "core-file $objdir/$subdir/prelink.core" "$test" {
-    -re "warning: \.dynamic section.*not at the expected address.*warning: difference.*caused by prelink, adjusting expectations." {
+    -re "warning: \.dynamic section.*not at the expected address.*warning: difference.*caused by prelink, adjusting expectations.*$gdb_prompt $" {
 	pass "$test"
     }
 }

[-- Attachment #3: Type: text/plain, Size: 249 bytes --]


-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

  reply	other threads:[~2006-03-09  0:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01 20:05 Daniel Jacobowitz
2006-03-03 14:49 ` Alexandre Oliva
2006-03-06 18:38   ` Daniel Jacobowitz
2006-03-07  8:38     ` Alexandre Oliva
2006-03-07 19:34       ` Daniel Jacobowitz
2006-03-09  4:40         ` Alexandre Oliva [this message]
2006-03-25  7:02           ` 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=oru0a8sc3b.fsf@free.oliva.athome.lsd.ic.unicamp.br \
    --to=aoliva@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