punning the pcb to an array of ints and using magic indices to
access values in it. This should prevent silent breakage from
changes in the pcb.
Supply 0 for unavailable registers instead of punning the tss to
an array of ints and using magic indices to access garbage values
in it. (The registers are in the pcb; there is nothing interesting
in the tss. This should change someday. At least for dumps, all
the registers should be saved, and common_tss is a good place to
put them.)
Removed ancient wrong (disabled) method for reading eip.
UPAGES layout.. it was entirely too comfortable with reading and writing
the U area before. I've changed it to use PT_GETREGS/PT_PUTREGS
ptrace ops instead of READ_U etc. The code to read the registers from
core dumps is a bandaid at best. It seems to have problems reading
core dumps from dynamic linked executables still, but at least static
dumps work.
I desperately need help from a gdb/bfd expert. :-) HELP!!
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1) add Garrett Wollman's trap frame resolving mods
2) make the `proc' command (kernel debugging) really work
3) allow use of a pid with the `proc' command (previously you had to
provide the address of the proc structure)
Unfortunately, the `proc' command won't work while doing remote debugging.
alias `pcb_cr3' instead. That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
This might be useful for debugging applications that use a special LDT.
However, printing of all segment registers is currently broken.
Don't print "last exception: " before the FPU opcode and pc, etc. The
opcode and pc, etc., are for the last FPU _instruction_.
Pass the saved exception status word to print_387_status() so that the
exception(s) that caused or will cause a trap can be seen. The kernel
has supported this since 1.1 or before. The kernel still clobbers the
tag word if a trap occurs.
Remove unused null function clear_regs().
the wild, slippery orgy commence!
Gary Jennejohn, too studly for his own good, has finally come through with
the new, improved gdb 4.13. This gdb features:
o kgdb support - if this works (and I urge folks to test it), we can
finally purge the old and hateful version of kgdb from our source
tree.
o attach/detach support. See comments in README.FreeBSD for more
details.
o Well, it's newer. Our previous version was 4.11.
Comments and flames to gj, of course! :-)
Thanks, Gary. Much appreciated. The previous state of gdb/kgdb has been a
thorn in all of our sides for some time..
Submitted by: gj
This is a greatly pared down version of the full gdb-4.12, all the
config stuff has been removed and the supporting libraries have
been stripped to a minimum. This is a 1.1.5 only port, I'll do a
more complete port for 2.0 which will have all the config stuff
and will install the gnu support libraries as system libraries like
we do for readline.
There wasn't much point for 1.1.5 since only gdb would use them so I
went for saving space instead. For 2.0 I'll config all the
other gnu tools to use them as well.