-
- Downloads
Rewrite registry.h
This rewrites registry.h, removing all the macros and replacing it with relatively ordinary template classes. The result is less code than the previous setup. It replaces large macros with a relatively straightforward C++ class, and now manages its own cleanup. The existing type-safe "key" class is replaced with the equivalent template class. This approach ended up requiring relatively few changes to the users of the registry code in gdb -- code using the key system just required a small change to the key's declaration. All existing users of the old C-like API are now converted to use the type-safe API. This mostly involved changing explicit deletion functions to be an operator() in a deleter class. The old "save/free" two-phase process is removed, and replaced with a single "free" phase. No existing code used both phases. The old "free" callbacks took a parameter for the enclosing container object. However, this wasn't truly needed and is removed here as well.
Showing
- gdb/Makefile.in 0 additions, 1 deletiongdb/Makefile.in
- gdb/ada-lang.c 3 additions, 2 deletionsgdb/ada-lang.c
- gdb/ada-tasks.c 2 additions, 2 deletionsgdb/ada-tasks.c
- gdb/arm-tdep.c 2 additions, 2 deletionsgdb/arm-tdep.c
- gdb/auto-load.c 2 additions, 2 deletionsgdb/auto-load.c
- gdb/auxv.c 1 addition, 1 deletiongdb/auxv.c
- gdb/break-catch-syscall.c 1 addition, 1 deletiongdb/break-catch-syscall.c
- gdb/breakpoint.c 1 addition, 1 deletiongdb/breakpoint.c
- gdb/coffread.c 1 addition, 1 deletiongdb/coffread.c
- gdb/ctfread.c 4 additions, 4 deletionsgdb/ctfread.c
- gdb/dbxread.c 1 addition, 1 deletiongdb/dbxread.c
- gdb/dwarf2/frame.c 2 additions, 2 deletionsgdb/dwarf2/frame.c
- gdb/dwarf2/read.c 5 additions, 3 deletionsgdb/dwarf2/read.c
- gdb/elfread.c 2 additions, 2 deletionsgdb/elfread.c
- gdb/fbsd-tdep.c 1 addition, 1 deletiongdb/fbsd-tdep.c
- gdb/gdb-stabs.h 1 addition, 1 deletiongdb/gdb-stabs.h
- gdb/gdb_bfd.c 7 additions, 7 deletionsgdb/gdb_bfd.c
- gdb/gdb_bfd.h 7 additions, 1 deletiongdb/gdb_bfd.h
- gdb/gdbtypes.c 3 additions, 3 deletionsgdb/gdbtypes.c
- gdb/guile/guile-internal.h 1 addition, 1 deletiongdb/guile/guile-internal.h
Loading
Please register or sign in to comment