Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch] "single step" atomic instruction sequences as a whole.
Date: Sat, 17 Feb 2007 02:24:00 -0000	[thread overview]
Message-ID: <1171678999.26782.16.camel@localhost> (raw)

Emi,

I tried your patch against the CVS head. GDB seems to handle this set of
instructions just fine:

0x40000119a00 <._IO_puts+80>:   beq-    cr7,0x40000119a3c <._IO_puts
+140>
0x40000119a04 <._IO_puts+84>:   li      r0,1
0x40000119a08 <._IO_puts+88>:   lwarx   r11,0,r3
0x40000119a0c <._IO_puts+92>:   cmpw    r11,r9
0x40000119a10 <._IO_puts+96>:   bne-    0x40000119a1c <._IO_puts+108>
0x40000119a14 <._IO_puts+100>:  stwcx.  r0,0,r3
0x40000119a18 <._IO_puts+104>:  bne+    0x40000119a08 <._IO_puts+88>
0x40000119a1c <._IO_puts+108>:  isync
0x40000119a20 <._IO_puts+112>:  cmpwi   cr7,r11,0
0x40000119a24 <._IO_puts+116>:  bne-    cr7,0x40000119b84 <._IO_puts
+468>

If i step through "lwarx", i end up with this:

Stepping over an atomic sequence of instructions.
Beginning at 0x0000040000119a08, break at 0x0000040000119a18 next time.
0x0000040000119a18 in ._IO_puts () from /lib64/power5/libc.so.6

So far so good. But if we continue executing the program we will
eventually reach a set of instructions like this one:

0x40000119ae8 <._IO_puts+312>:  lwarx   r9,0,r3
0x40000119aec <._IO_puts+316>:  stwcx.  r0,0,r3
0x40000119af0 <._IO_puts+320>:  bne+    0x40000119ae8 <._IO_puts+312>

At this point, GDB keeps stepping through the lwarx and stwcx
instructions endlessly. If i hit continue right after the first
breakpoint (0x40000119a08), the program ends normally

I tested the same instruction block with Paul's patch and this did not
happen, stating that it skipped the atomic instruction set as usual, and
ending the program.

I'm trying to figure out what is going on exactly.

Regards,
Luis


             reply	other threads:[~2007-02-17  2:24 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-17  2:24 Luis Machado [this message]
2007-02-27 13:00 ` Emi SUZUKI
2007-02-27 13:17   ` Daniel Jacobowitz
2007-02-28  8:08     ` Emi SUZUKI
2007-02-28 11:46       ` Daniel Jacobowitz
2007-02-28 16:09         ` Luis Machado
2007-03-02 12:47           ` Emi SUZUKI
2007-03-06 11:00             ` Andreas Schwab
2007-03-06 12:24               ` Daniel Jacobowitz
2007-03-08  8:50                 ` Emi SUZUKI
2007-03-08 16:15                   ` Ulrich Weigand
2007-03-13  6:12                     ` SUZUKI Emi
  -- strict thread matches above, loose matches on Subject: below --
2007-03-15 22:24 Luis Machado
2007-04-10 20:40 ` Daniel Jacobowitz
2007-04-12 12:09   ` Luis Machado
2007-04-12 12:15     ` Daniel Jacobowitz
2007-04-12 12:54       ` Luis Machado
2007-04-12 12:58         ` Daniel Jacobowitz
2007-04-12 13:30           ` Luis Machado
2007-04-12 13:35             ` Daniel Jacobowitz
2007-04-12 14:58               ` Ulrich Weigand
2007-04-12 15:33                 ` Daniel Jacobowitz
2007-04-12 17:16                   ` Ulrich Weigand
2007-04-12 18:25                     ` Daniel Jacobowitz
2007-04-12 20:09                       ` Ulrich Weigand
2007-04-12 20:16                         ` Mark Kettenis
2007-04-12 20:43                           ` Ulrich Weigand
2007-04-14 15:20                             ` Mark Kettenis
2007-04-14 18:13                               ` Ulrich Weigand
2007-04-12 20:49                           ` Daniel Jacobowitz
2007-04-12 20:48                         ` Daniel Jacobowitz
2007-04-12 14:32     ` Ulrich Weigand
2007-04-12 14:47       ` Luis Machado
2007-04-12 15:00         ` Ulrich Weigand
2007-02-06 11:02 Luis Machado
2007-02-06 12:11 ` Emi SUZUKI
2007-02-07 13:10   ` Luis Machado
2007-02-08 13:00     ` Emi SUZUKI
2006-09-18 11:59 emin ak
2006-11-09 13:07 ` [patch] " emin ak
2006-06-22 20:56 PAUL GILLIAM
2006-06-22 21:53 ` PAUL GILLIAM
2006-06-22 22:20   ` PAUL GILLIAM
2006-11-10 21:18 ` 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=1171678999.26782.16.camel@localhost \
    --to=luisgpm@linux.vnet.ibm.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