This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR threads/2015: Fix adjust_pc_after_break for thread debugging


On Wed, Sep 28, 2005 at 12:10:18AM +0200, Andreas Schwab wrote:
> adjust_pc_after_break is doing the wrong thing during thread debugging
> when the current thread is different from the thread when the debuggee was
> stopped last.  The problem is that it calls currently_stepping, which
> accesses global variables that are part of the thread context.  But the
> context switch will only happen much later on.  The proposed fix will skip
> the call when the current infrun context does not match the thread to be
> examined.  This has been tested on x86_64-suse-linux and fixes 32
> testcases without any regressions.

I've got no objection.  Mark asked you to test software single step and
non-decr-pc-after-break; I agree with you that the patch can't have any
effect if either of those is the case (see the context).  So I think
this is OK.  Mark?

I was worried about the case when the thread previously being stepped
is not the event thread.  But it seems to be OK and there are some
problems there already (we don't keep track of whether the single-step
succeeded or not in some cases, for instance).

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]