Project Archer
Project Archer is a gdb development branch primarily dedicated to improving the C++ debugging experience. However, other modifications to gdb may be attempted on the branch as well.
Getting the source
Archer is hosted in a git repository. You can clone it using:
git clone --origin archer git://sourceware.org/git/archer.git
git clone --origin archer ssh://sourceware.org/git/archer.git
The git:// scheme is not recommended for read-write access. If you intend to push to the Archer repo, use the ssh:// scheme.
Then you can check out and track the trunk using:
cd archer; git checkout --track -b BRANCHNAME archer/BRANCHNAME
BRANCHNAME must be the specific branch of the Archer project. There is currently no single merged branch of the whole project. See ArcherBranchManagement for the available branches.
Contacting Archer developers
Archer has its own mailing list (and as gmane group gmane.comp.debugging.archer).
You can also find the Archer developers on the gdb irc channel, aka irc.freenode.net #gdb.
Archer also has a read-only commits mailing list. All commits to the git repository are also sent to this list. Feel free to follow-up posts to the commits list to the main archer list.
To subscribe to a list, you can either send email to the standard -subscribe address, or you can fill out the form about halfway down this page.
Roadmap
The Archer project consists of a number of sub-projects. Initially the Archer mandate was to improve the C++ debugging experience, but since then it has broadened a bit.
Specific tasks that go into a sub-project are generally tracked in gdb's bugzilla and tagged with the archer keyword. You can use this search to find all the open archer-related bugs.
- Expression Parsing. GDB's understanding of C++ expressions is incomplete. Most of the sub-tasks here are in bugzilla.
Virtual methods table printing (print OBJ->VIRTFUNC) using DW_AT_vtable_elem_location (set print object?).
- Fedora patches. Fedora has a big backlog of gdb patches. We will rebase these to a more recent gdb, integrate them into archer, and send them upstream as appropriate.
- Keeping abreast of GCC changes. This mostly involves coping with changes to the DWARF that GCC emits, but occasionally there are other tasks. These are tracked in bugzilla.
- Scalability. Can we scale to thousands of breakpoints? Of inferiors? Does it make sense to also lazily read minsyms?
See DebuggingLargePrograms for some hints.
See also the discussion around PTRACE_O_INHERIT in this thread.
- Try to delay even the search for a separate debug info file till it is required for a specific operation.
- See what, if anything, we need to do to make multi-inferior work excellently on Linux.
Handle >4GB inferior sizes (64bit obstack, 64bit TYPE_LENGTH etc.).
Python-based enhancements. See PythonGdb.
- Showing information about Java objects given JNI handles
- Interleaving Java frames in the stack trace
- Fabricating unwind information for JIT'd code
- Automatically handling SEGVs related to the garbage collector without hiding SEGVs for native code
There are a few more ideas in this thread; anything not listed on this wiki page is something we consider to be lower priority.
Videos
We have a few screencasts of Archer in action.
Trivia
Q: Why is it called Project Archer?
A: The Archer Fish is the GDB Mascot.
Completed Projects
We've completed a number of tasks and put some others on hold. We record these for posterity. The text here is directly taken from our old task list, so it is mostly phrased in the negative.
- Expression Parsing.
- Sometimes gdb requires the user to do excessive quoting
- There are several problems involving namespaces:
Namespaces and classes cannot currently own using declarations in gdb
using declarations are not considered on a per-block basis
- gdb does not understand namespace aliases
- gdb does not understand the global namespace operator
C++ new-style cast operators, like reinterpret_cast
- There are some bugs with virtual classes
- Koenig lookup is not implemented (Sami)
Printing of annotated virtual method table (for both instances and classes - is it set print vtbl?).
decltype
- Exception handling.
An inferior function call which throws an exception will cause GDB to lose control of the inferior. This is because of the mechanics of the dummy frame construction. If this is the case, rescue the inferior and unwind.(GDB PR 9600. Solution submitted under archer-pmuldoon-exception-rewind branch).
next over an exception-throwing call will cause GDB to lose control over the inferior. This is very unfriendly. (GDB PR 9593. Solution being worked on archer-pmuldoon-next-over-throw branch.)
catch throw and catch catch are documented as catching named or all exceptions. GDB can only catch all exceptions. Fix documentation to reflect reality. (GDB PR 9598)
- DWARF-related tasks
- Opcode audit. We know that there are a few DWARF opcodes that are not implemented (some are in bugzilla). This task is to audit GDB and implement all unimplemented opcodes (except those mentioned above).
DW_OP_*piece implementation. GDB does not fully implement DW_OP_piece and does not implement DW_OP_bit_piece at all. GDB should track data availability by bit or byte, and expression evaluation and value printing should nicely reflect this. See GDB PR 9977 and GDB PR 9978. (Tom)
Improve GDB performance using a DWARF index. See the GCC PR. To be a success this would have to eliminate the delays in the current lazy symtab reading code. (Tom)
- Lazy type instantiation. This might be part of the indexing task. (We don't seem to need this. The index seems fast enough, and the DWARF compressor will help with memory use when the time comes.)
- Remove psymtabs when using DWARF. This might also be part of the indexing task. (Tom)
Implement DW_OP_GNU_implicit_pointer (Tom)
Implement typed DWARF stack. GDB PR 12617
Handle break inlinefunction better. GDB PR 10738
Implement DW_TAG_imported_unit. GDB PR 10240 (Tom)
- Pretty-printing. Many containers in libstdc++, for example, are inscrutable to the user. Our goal is to fix this by allowing application- and library-specific pretty-printers, written in Python, to change how values are displayed. See STLSupport.
- Fortran support improvements.
Support for Fortran modules and importing of their namespaces does not work (flat fix is GDB PR 9806, namespaces support is archer-jankratochvil-fortran-module).
Arrays allocated, associated or passed as parameter are now displayed with their passed length (GDB PR 9260, GDB PR 9395, in archer-jankratochvil-vla).
Fortran Unicode wide characters are printed as numbers (GDB PR 10036).
- Scalability. Attaching to programs with many shared libraries is very slow. One subproject is to fix this.
- GCC changes. Part of our project's scope spills over to gcc. There are a number of gcc debuginfo bugs that we would like to fix.
Syscall. One archer branch is dedicated to adding catch syscall functionality.
Implement catch signal. This has been reported a couple of times; it is different from handle in that you can put commands on a catch.
Implement watch -location. Maybe just take the code from Apple's repository. (Tom)
- Python
Let the user do prompt substitutions. This comes up over and over. It is also easy (probably shouldn't be on this list
- Clean up and integrate Oguz's patches
Ongoing Projects
Projects which are being developed.