Subject: re: GDB breakpoints / alpha
To: Nathan J. Williams <nathanw@MIT.EDU>
From: matthew green <email@example.com>
Date: 12/11/2000 11:47:46
> i'm trying to port gdb-current to the alpha, using the gnu/dist/gdb
> alpha bits. i've finally gotten to the stage where it links and
> runs, but breakpoints don't work. they just ignored.
> i'm fairly gdb clueless -- anyone have any ideas on where to begin looking?
When I was debugging a similar problem, I made heavy use of ktrace(1)
on gdb, keeping an eye on calls to ptrace(2). Setting a breakpoint is
done with a PT_READ_I to read the original instruction at a location,
followed by a PT_WRITE_D to set the instruction to something that
causes a breakpoint trap. (since the kernel does the same thing for _D
and _I ptrace requests, this inconsistency doesn't matter).
On the Alpha, gdb should be writing 0x00000080, which is the bpt
instruction (really a CALL_PAL bpt instruction); this comes out of the
BREAKPOINT define in gdb/config/alpha/tm-alpha.h.
ok, thanks for the hint. gdb isn't making _any_ PT_WRITE_D calls for
setting breakpoints. it _is_ able to read & write child memory, however,
so these calls are working.... it's just for some reason, it never is.
next step: why?