Bug 3676 - TestTaskObserverInstructionAndCode kills (sigsegv or sigill) tracee
Summary: TestTaskObserverInstructionAndCode kills (sigsegv or sigill) tracee
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks: 3346 3500
  Show dependency treegraph
 
Reported: 2006-12-07 15:22 UTC by Mark Wielaard
Modified: 2007-01-15 13:53 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2006-12-07 15:22:36 UTC
The test in TestTaskObserverInstructionAndCode adds an Instruction and Code
observer, steps, deletes both and adds a new Code observer. This crashes the
tracee as soon as it is resumed.
Comment 1 Andrew Cagney 2006-12-07 20:30:49 UTC
Try tracing the program counter each time the program is resumed and confirm
that it is pointing at the correct instruction.

On the i386, for a breakpoint, the instruction pointer is +1 the required value,
for complex combinations of PT_STEP and hitting a breakpoint, that gets complex.
Comment 2 Andrew Cagney 2006-12-07 20:54:50 UTC
single-stepping a breakpoint advances the pc; presumably though it should be
treated as though the breakpoint was hit with a continue - the pc needs to be
decremented.
Comment 3 Mark Wielaard 2007-01-15 13:53:39 UTC
2007-01-15  Mark Wielaard  <mark@klomp.org>

        Fixes bug #3676
        * Breakpoint.java (stepDone): Only set if still installed.
        (isInstalled): new method.
        (toString): Prettify.
        * IsaIA32.java (isTaskStepped): Reset flag.
        * IsaX8664.java (isTaskStepped): Likewise.
        * LinuxIa32On64.java (LinuxIa32On64): Install IndirectRegisters for
        d0 till d7.
        * LinuxPtraceTaskState.java (Running.sendContinue): Rewritten to take
        breakpoints into account.
        (Running.handleStoppedEvent): Fix log message. Call sendContinue()
        on new state.
        (Running.handleTrappedEvent): Rewritten.
        (running, syscallRunning, inSyscallRunning, inSyscallRunningTraced):
        Now have type Running.
        (BlockedSignal.handleUnblock): Call sendContinue() on new state.
        * TestTaskObserverInstruction.java: Don't test Isa.isTaskStepped().
        * TestTaskObserverInstructionAndCode.java: Enable.