* [ob] Don't clobber inferior_ptid in read_pc_pid
@ 2004-02-28 17:35 Daniel Jacobowitz
2004-02-28 19:32 ` Andrew Cagney
2004-02-29 17:02 ` Daniel Jacobowitz
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-28 17:35 UTC (permalink / raw)
To: gdb-patches
Another issue found in testing on arm-linux. A return was added to this
function back in June; if we return from the middle of it, we leave
inferior_ptid set to the wrong thread. This causes a "!ptid_equal
(ecs->ptid, inferior_ptid)" test to fail, since we called read_pc_pid
with ecs->ptid. That leads to not calling context_switch; which clobbers
the stepping range for the previous thread; which causes stepping to stop
unexpectedly.
I'll commit this patch as obvious in a day or two.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-02-28 Daniel Jacobowitz <drow@mvista.com>
* regcache.c (read_pc_pid): Restore inferior_ptid after reading
PC_REGNUM.
Index: gdb/regcache.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/regcache.c,v
retrieving revision 1.108
diff -u -p -r1.108 regcache.c
--- gdb/regcache.c 15 Feb 2004 15:22:06 -0000 1.108
+++ gdb/regcache.c 27 Feb 2004 19:31:13 -0000
@@ -1332,8 +1332,7 @@ read_pc_pid (ptid_t ptid)
else if (PC_REGNUM >= 0)
{
CORE_ADDR raw_val = read_register_pid (PC_REGNUM, ptid);
- CORE_ADDR pc_val = ADDR_BITS_REMOVE (raw_val);
- return pc_val;
+ pc_val = ADDR_BITS_REMOVE (raw_val);
}
else
internal_error (__FILE__, __LINE__, "read_pc_pid: Unable to find PC");
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ob] Don't clobber inferior_ptid in read_pc_pid
2004-02-28 17:35 [ob] Don't clobber inferior_ptid in read_pc_pid Daniel Jacobowitz
@ 2004-02-28 19:32 ` Andrew Cagney
2004-02-29 3:14 ` Daniel Jacobowitz
2004-02-29 17:02 ` Daniel Jacobowitz
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2004-02-28 19:32 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> Another issue found in testing on arm-linux. A return was added to this
> function back in June; if we return from the middle of it, we leave
> inferior_ptid set to the wrong thread. This causes a "!ptid_equal
> (ecs->ptid, inferior_ptid)" test to fail, since we called read_pc_pid
> with ecs->ptid. That leads to not calling context_switch; which clobbers
> the stepping range for the previous thread; which causes stepping to stop
> unexpectedly.
>
> I'll commit this patch as obvious in a day or two.
Can you please commit it now?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ob] Don't clobber inferior_ptid in read_pc_pid
2004-02-28 19:32 ` Andrew Cagney
@ 2004-02-29 3:14 ` Daniel Jacobowitz
2004-02-29 4:02 ` Andrew Cagney
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-29 3:14 UTC (permalink / raw)
To: gdb-patches
On Sat, Feb 28, 2004 at 02:32:55PM -0500, Andrew Cagney wrote:
> >Another issue found in testing on arm-linux. A return was added to this
> >function back in June; if we return from the middle of it, we leave
> >inferior_ptid set to the wrong thread. This causes a "!ptid_equal
> >(ecs->ptid, inferior_ptid)" test to fail, since we called read_pc_pid
> >with ecs->ptid. That leads to not calling context_switch; which clobbers
> >the stepping range for the previous thread; which causes stepping to stop
> >unexpectedly.
> >
> >I'll commit this patch as obvious in a day or two.
>
> Can you please commit it now?
Sorry, I had left before this message arrived.
My goal in waiting was to retest on another target, which I did not
have time for this morning, and to wait for the release branch to be
confusion on my own part about the timing, since as of your
next-to-last announcement you were planning on back-dating the release
branch. These are patches I consider suitable for the release branch
and it's not much extra work for me to retest and commit them on two
branches.
When I check in patches immediately people complain that I am acting
impetuously. When I wait you ask me to commit the patch now. When I
get back and see your message I get:
> Daniel, what the f- are you doing? I'm half way through cutting a
> branch, the last thing I need is you being a fly-by nighter checking in
> random stuff.
OK, I'm wrong no matter what I do. I'll come back to fixing ARM in a
few days when the dust has settled.
FYI, I stopped committing to the release branch as soon as I saw your
message asking me to. You don't need to curse at me about it. In
fact, I'd appreciate it if you wouldn't.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ob] Don't clobber inferior_ptid in read_pc_pid
2004-02-29 3:14 ` Daniel Jacobowitz
@ 2004-02-29 4:02 ` Andrew Cagney
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-02-29 4:02 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> On Sat, Feb 28, 2004 at 02:32:55PM -0500, Andrew Cagney wrote:
>
>>>> >Another issue found in testing on arm-linux. A return was added to this
>>>> >function back in June; if we return from the middle of it, we leave
>>>> >inferior_ptid set to the wrong thread. This causes a "!ptid_equal
>>>> >(ecs->ptid, inferior_ptid)" test to fail, since we called read_pc_pid
>>>> >with ecs->ptid. That leads to not calling context_switch; which clobbers
>>>> >the stepping range for the previous thread; which causes stepping to stop
>>>> >unexpectedly.
>>>> >
>>>> >I'll commit this patch as obvious in a day or two.
It isn't obvious, but it does appear to be correct.
>>> Can you please commit it now?
>
>
> Sorry, I had left before this message arrived.
>
> My goal in waiting was to retest on another target, which I did not
> have time for this morning, and to wait for the release branch to be
> confusion on my own part about the timing, since as of your
> next-to-last announcement you were planning on back-dating the release
> branch. These are patches I consider suitable for the release branch
> and it's not much extra work for me to retest and commit them on two
> branches.
>
> When I check in patches immediately people complain that I am acting
> impetuously. When I wait you ask me to commit the patch now. When I
> get back and see your message I get:
My post clearly has context - if that change were committed before the
branch was cut, life will be easy for all concerned.
It doesn't say commit to an un-announced branch the moment you see the
first hint that it is being created. That will make the release
engineer's life hell.
I'm going to alter the releng notes to point out that the first mention
of the branch should be its announcement. That hopefully will stop
future occurances of this problem.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ob] Don't clobber inferior_ptid in read_pc_pid
2004-02-28 17:35 [ob] Don't clobber inferior_ptid in read_pc_pid Daniel Jacobowitz
2004-02-28 19:32 ` Andrew Cagney
@ 2004-02-29 17:02 ` Daniel Jacobowitz
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-29 17:02 UTC (permalink / raw)
To: gdb-patches
On Sat, Feb 28, 2004 at 12:35:41PM -0500, Daniel Jacobowitz wrote:
> Another issue found in testing on arm-linux. A return was added to this
> function back in June; if we return from the middle of it, we leave
> inferior_ptid set to the wrong thread. This causes a "!ptid_equal
> (ecs->ptid, inferior_ptid)" test to fail, since we called read_pc_pid
> with ecs->ptid. That leads to not calling context_switch; which clobbers
> the stepping range for the previous thread; which causes stepping to stop
> unexpectedly.
> 2004-02-28 Daniel Jacobowitz <drow@mvista.com>
>
> * regcache.c (read_pc_pid): Restore inferior_ptid after reading
> PC_REGNUM.
I have committed this to HEAD.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-02-29 17:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 17:35 [ob] Don't clobber inferior_ptid in read_pc_pid Daniel Jacobowitz
2004-02-28 19:32 ` Andrew Cagney
2004-02-29 3:14 ` Daniel Jacobowitz
2004-02-29 4:02 ` Andrew Cagney
2004-02-29 17:02 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox