This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/WIP PATCH 02/14] Mask software breakpoints from memory writes too
Pedro Alves <pedro@codesourcery.com> writes:
> On Tuesday 13 December 2011 21:24:24, Andreas Schwab wrote:
>> Pedro Alves <pedro@codesourcery.com> writes:
>>
>> > 2011-12-06 Pedro Alves <pedro@codesourcery.com>
>> >
>> > gdb/
>> > * breakpoint.c (breakpoint_restore_shadows): Rename to ...
>> > (breakpoint_xfer_memory): ... this. Change prototype. Handle
>> > memory writes too.
>> > * breakpoint.h (breakpoint_restore_shadows): Delete.
>> > (breakpoint_xfer_memory): Declare.
>> > * mem-break.c (default_memory_insert_breakpoint)
>> > (default_memory_remove_breakpoint): Use target_write_raw_memory.
>> > (memory_xfer_partial): Rename to ...
>> > (memory_xfer_partial_1): ... this. Don't mask out breakpoints
>> > here.
>> > (memory_xfer_partial): New.
>> > (target_write_raw_memory): New.
>> > * target.h (target_write_raw_memory): New.
>>
>> That completely breaks gdb on powerpc. Breakpoints cause gdb to infloop.
>
> Got a backtrace showing the loop? It'd be really helpful.
This is repeated endlessly with stop_pc never advancing:
infrun: proceed (addr=0xf7fe26b8, signal=0, step=0)
infrun: resume (step=0, signal=0), trap_expected=0, current thread [process 26306] at 0xf7fe26b8
infrun: wait_for_inferior ()
infrun: target_wait (-1, status) =
infrun: 26306 [process 26306],
infrun: status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7fdb5a0
bpstat_what: bp_shlib_event
infrun: BPSTAT_WHAT_SINGLE
infrun: no stepping, continue
infrun: resume (step=1, signal=0), trap_expected=1, current thread [process 26306] at 0xf7fdb5a0
infrun: prepare_to_wait
infrun: target_wait (-1, status) =
infrun: 26306 [process 26306],
infrun: status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0xf7fdb5a0
bpstat_what: bp_shlib_event
infrun: BPSTAT_WHAT_SINGLE
infrun: no stepping, continue
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."