ftp://ftp.azstarnet.com/pub/linux/axp/misc
you can find the following files:
gdb-4.14axp.patch.gz: patch relative to FSF's gdb-4.14.tar.gz
axpbin-gdb-4.14.tar.gz: gdb binary & man page
What's fixed:
- Ctrl-R now works without segfaulting
- Ctrl-Z now works without generating an inifinite
number of "(gdb)" prompts
- "call exit(0)" works without crashing the system
(this is due to a kernel fix that's in 1.3.21)
- "call printf("howdy\n")" works indepdent of whether
debugging information for malloc() is present
(this is due to a fix to gdb itself)
- stepping into/over signal-handlers and backtracing
over the same should work now, too
Linux is quite unusual in the way it constructs the signal-return
code, so the third item required quite a few changes. It wouldn't
surprise me if there are still a few bugs left. However, as far as I
tested, everything works great (I didn't run it through the testsuite,
though). With current kernels (1.3.21+pci-patches or newer), what
should happen on signal delivery is the following:
- gdb stops printing a message that the program received a
signal; gdb prints the instruction/line that would be
executed next *if* no signal handler is going to be
invoked
- if a signal handler is going to be invoked, you can step
into the handler with either "stepi" or "step"; if you use
"next" or "nexti", the signal handler will be executed
all at once and gdb stops only after executing the handler
- once inside a signal handler, you can do "backtrace" and
go "up" and "down" in the frame-chain as usual; you can also
look at registers/variables and they should have the
correct values
- to get out of the signal-handler, use the usual commands,
such as "finish" or "step"/"stepi" until you're out of
the handler
I plan to submit the patches to FSF in a week or so. Thus, I'd
appreciate if you could test gdb as much as possible and let me know
of anything obviously wrong or inconsistent with the above
description.
Enjoy,
--david