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


So, I patched this line in infrun.c which is supposed to check that
the SIGILL was caused by a breakpoint:

      if (breakpoint_inserted_here_p (get_regcache_aspace (regcache),
				      regcache_read_pc (regcache)))

And changed it to:

      if (ecs->ws.value.sig == TARGET_SIGNAL_ILL ||
breakpoint_inserted_here_p (get_regcache_aspace (regcache),
				      regcache_read_pc (regcache)))

Now the signal is corrected reinterpreted as SIGTRAP:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x000081f6 in main () at test.c:4
4         printf("Hello, world!\n");

But the break address is incorrect, it's halfway through the code for
calling printf:

    81f4:       f24b 60a4       movw    r0, #46756      ; 0xb6a4
    81f8:       f2c0 0004       movt    r0, #4
    81fc:       f000 fce8       bl      8bd0 <_IO_puts>

So now I'm trying to fix the code for adjusting the PC after the trap.

Cheers,
Nicholas Sherlock


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