This is the mail archive of the gdb@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: ARM EABI Linux, breakpoints cause SIGILL and target dies


Hi Ulrich, thanks for the reply,

> ÂIf you have the kernel sources, you might want to compare the routines
> Âinstalled via register_undef_hook in arch/arm/kernel/ptrace.c.

So, the new kernel adds a bunch of code to support hardware
breakpoints, but I couldn't see any other changes there:

http://pastebin.com/HqTtdayG

> - Even on old kernels that return SIGILL, there is apparently some code
> Âin GDB that tries to recognize breakpoints anyway. ÂIt may well be
> Âthat this code does not (any longer) work correctly; it is never
> Âexercised on recent kernels, so a bug might have crept in ...
>
> ÂCan you do a run with "set debug infrun 1" in the case where you
> Âget the SIGILL?

Yep, here's the result:

Reading symbols from /root/a.out...done.
(gdb) set debug infrun 1
(gdb) start
Temporary breakpoint 1 at 0x81f4: file test.c, line 4.
Starting program: /root/a.out
infrun: proceed (addr=0x8170, signal=0, step=0)
infrun: resume (step=0, signal=0), trap_expected=0
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
infrun: target_wait (-1, status) =
infrun:   19563 [process 19563],
infrun:   status->kind = stopped, signal = SIGILL
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x81f6
infrun: random signal 4

Program received signal SIGILL, Illegal instruction.
infrun: stop_stepping
0x000081f6 in main () at test.c:4
4         printf("Hello, world!\n");
(gdb)

Cheers,
Nicholas Sherlock


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