Differences between revisions 4 and 5
Revision 4 as of 2006-08-16 20:38:26
Size: 4352
Editor: dsl093-172-095
Comment: Mention flash improvements.
Revision 5 as of 2007-01-21 04:39:08
Size: 4620
Editor: dsl093-172-095
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:

'''Memory usage'''

 * A full "struct symbol" is created for enumerators. If we could avoid that, it might save a lot of space. Enumerators are a large chunk of the symbol table in some programs, because they appear in header files (e.g. from glibc, from BFD).

This is a list of project ideas for GDB - potential improvements, new features, et cetera. If you have a large project to add to this list, you may want to put just a brief description and a link to a new Wiki page.

General

  • There are lots of bugs in the GNATS database. Everyone is welcome to look at them, reproduce them, comment on them, fix them, et cetera!
  • There are testsuite failures running 'make check' on many systems. Each one of these failures should be investigated, and either fixed or the testsuite adjusted.
  • There are many XFAIL (expected failure) and KFAIL (known failure) markers in the testsuite. Some of the XFAIL markers are for environmental problems, for instance known bugs in some compiler versions. But others of them are for bugs in GDB that no one has looked at in a long time. There should be fewer!

Internals

  • The GDB internals are filled with multiple ways of doing the same tasks, all subtly different. Pick a module of GDB, look at the interfaces it exports, and think about which ones should really exist.
  • Many internal functions have been deprecated but not removed. Some of the deprecated functions do not have obvious replacements; either replacements should be created or the deprecation markers removed. Others do have obvious replacements, and only await someone to update the old uses. Just search for "deprecated" or "DEPRECATED" in the sources, and you'll find lots of instances of this problem. This is a good introductory project for someone who wants to learn about the GDB internals.

Memory usage

  • A full "struct symbol" is created for enumerators. If we could avoid that, it might save a lot of space. Enumerators are a large chunk of the symbol table in some programs, because they appear in header files (e.g. from glibc, from BFD).

Breakpoints

  • A breakpoint should be able to have more than one associated machine address. Some examples of this are:
    • C++ constructors; GNU G++ emits at least two copies of most constructors, one for use in base classes and one for use in derived classes. This is a quality-of-implementation bug in G++, but in the mean time, we should support it.
    • Inlined functions.
    • Template instantiations.

    Some work has been done on this, and preliminary patches posted, for instance [http://sourceware.org/ml/gdb-patches/2005-03/msg00195.html this patch]. The thorniest user interface issues were never worked out, for instance how to display such breakpoints in "info break", how to control individual breakpoint locations, and how to modify the GDB/MI interface for these breakpoints. This is a big project.

Watchpoints

  • GDB issues an error if you try to set a hardware watchpoint on an unreadable address (for instance, an address which has not been malloc'd yet). It disables watchpoints when addresses become unreadable. Hardware permitting, it would be great to be able to set watchpoints in advance. With address space randomization turned off, as it still is on many systems, this would let you restart a program and find the first write to a heap data structure.

MI (Machine Interface)

  • The current MI implementation does not follow its own quoting rules, as described in the manual. Many commands delegate to CLI commands and let the CLI support code parse options themselves. We should not change the quoting rules for MI version 2, as currently implemented, but when we switch over to MI version 3 it would be good to get these correct. That means having two code paths for each mishandled command, one which imitates the existing bad quoting behavior and one which gets it right. There's a [http://sourceware.org/ml/gdb/2006-02/msg00283.html description of the current state] in the GDB mailing list archives.

Embedded Debugging

  • Patches have been posted for basic flash memory support, but there is still plenty of room for ["Flash Debugging Improvements"].

gdbserver

  • Gdbserver for GNU/Linux uses timeouts and waits for child processes repeatedly. Try stracing it while running a program to see what this means. GDB uses sigsuspend and catches SIGCHLD instead. It would be more efficient for gdbserver to do the same thing. This requires a bit of reorganization for the backend to handle SIGCHLD.
  • Gdbserver doesn't support tracepoints. A few people have said they would work on this, but no patches for it have ever been submitted to the mailing list. This could be a nice introductory project for someone interested in remote debugging.

None: ProjectIdeas (last edited 2021-03-10 14:25:22 by TomTromey)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.