crash-utility/crash — pull request #2 by jeffmahoney (2014-10-19 01:25:55+00:00)
Title: Cleanup and update to gdb 7.8

Hi Dave -

Our Hack Week at SUSE is next week, and I'm planning on continuing a project I've been working on to extend the Python functionality exported by GDB to be useful through crash. I'm aware of several other projects with similar goals. I've already gotten the needed bits integrated into our gdb, which is at version 7.8. When I updated the patches from an earlier version to 7.8, there were substantial differences. I didn't really want to maintain two sets of patches: one against gdb and the other against the gdb that crash uses. Since there's no real reason *not* to update crash's gdb version to 7.8, I went ahead and integrated it with crash.

This pull request covers a fair amount of ground.

- I've removed support for gdb versions prior to 7.6
- Cleaned up configuration of different gdb versions
- Renamed read_string within crash to men_read_string to avoid renaming gdb functions
- Use pointers to minimal_symbols for patching rather than pointers to longs (this one is needed for 7.8)
- The command hook has been removed in 7.8, so I've implemented an interpreter that just copies the cli interpreter during its own initialization and overrides the command fund.
- Constify parameters for a few functions
- Eliminate a few global variables that can be replaced with cleaner options
- Break out the gdb interface code from gdb-7.6.patch into a separate file
- Add support for gdb 7.8.

I've done some light testing with the command loop, but if you have a test system, I'd be happy to drive it a bit more.