-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the extended prompt. #25
Conversation
The old layout is difficult to maintain due to the size of gdbinit and the fact that it is difficult to identify various components. The file has now been broken up into multiple submodules which are loaded by the main gdbinit file. .gdb and .gdbinit has to be symbolically linked to the users home directory for this to work.
Reindented code so that every module follows the same syntax.
Attempt to autodetect the target architecture and set up the global flags accordingly. This will make it unneccessary to try to figure this out manually and hardcode the values in .gdbinit.
Restructures the architecture-specific code to never assume that a certain architecture is being used. Adds a $MIPS global that when set to 1 identifies that the debugged target is MIPS. Also breaks out the script for detecting a target and places it as a bash-script in the .gdb-directory to make it easier to debug.
When passing an expression containing spaces as an argument to a GDB command it will be interpreted as multiple arguments even when enclosed in parentheses. In order to follow the general coding style these arguments are broken out and set in local variables that are then passed as arguments instead.
Having the ChangeLog in the .gdbinit-file now that it has been modularized made little sense since the user will need a .gdb-directory anyway. Moved the ChangeLog into a file of the same name and reflowed it so that it can be read without going bonkers.
Since hooks are general and there might be commands defined in multiple modules that need to install something into the same hook they have been moved to the .gdbinit-file instead.
Updates the README to contain a list of contributors to gdbinit. Also adds documentation on many of the commands that it defines.
Copy the solution used for mips to ensure that only registers that are valid will be printed. I.e. if a register is set to "void" print zero instead of bailing out.
The commands were a bit difficult to read, hopefully this will make the documentation a little better.
Renames the GDB command files to separate them from the shell scripts etc. Also, this makes it easier for the editor to figure out what indentation, syntaxt highlighting etc to use. Also renames the CPU-specific modules to cpu-<architecture>.gdb to make it more obvious that they are submodules to cpu.gdb.
- the old `gdbinit-MacsBug-without-plugin` file that Apple ships with their gdb - the `kgmacros` that Apple ships with their kernel debug kit
add some gdb macros from Apple
found some more .gdb files in Apple's version of gdb
Unfortunately, gdb under Snow Leopard doesn't give a useful doublet. So let's go the extra step and grab the osabi and use it to determine what processor we're using and the size.
…leopard Attempt to detect the correct processor type under Snow Leopard's gdb.
Humm... can't merge. That feature does not exist in OS X version :-( |
@gdbinit GDB is not compiled with |
No, Apple gdb version is too old and GNU version is not that great in OS X. |
@gdbinit |
Humm then there are no real advantages versus using COLOREDPROMPT option to fix this issue. |
Well, using |
I forgot about this PR and ended up adding some unrelated commits to |
This should fix #19.
You can check the doc: https://sourceware.org/gdb/onlinedocs/gdb/Prompt.html
And the available escape sequences: https://sourceware.org/gdb/onlinedocs/gdb/gdb_002eprompt.html#gdb_002eprompt
We just need to find how to detect "versions of gdb that ship with Python scripting enabled": https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html#Python
In a shell, it can be checked with:
In GDB:
So I guess this could be checked automatically. For now, a variable is set.
I think this is enabled by default on Linux, but probably not on Windows with MinGW. I don't know about Mac OS X.