This is the mail archive of the gdb-prs@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]

[Bug gdb/19061] gdb-7.10 hangs/spins-on-cpu when debugging any program on Alpha


https://sourceware.org/bugzilla/show_bug.cgi?id=19061

--- Comment #4 from Pedro Alves <palves at redhat dot com> ---
We see:

 LLR: Preparing to step process 2636, 0, inferior_ptid process 2636
 LLR: PTRACE_SINGLESTEP process 2636, 0 (resume event thread)
 ...
 LLW: waitpid 2636 received Trace/breakpoint trap (stopped)
 CSBB: process 2636 stopped by software breakpoint
 ...
 infrun: stop_pc = 0x20000003428
 infrun: delayed software breakpoint trap, ignoring

And Alpha is a decr_pc_after_break arch:

 $ grep decr_pc_after *  | grep alpha
 alpha-tdep.c:  set_gdbarch_decr_pc_after_break (gdbarch, ALPHA_INSN_SIZE);

If GDB got that "stopped by software breakpoint" stop reason wrong, it will
decrement the thread's PC by ALPHA_INSN_SIZE when it shouldn't.  Then the next
time the thread is resumed, it executes the wrong instruction, in turn
manifesting in odd things like odd loops and crashes.

See linux-nat.c:save_stop_reason for where the PC is decremented.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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