From f643c0cd8bf5c0c1fb2cca7824ff56c4a6984589 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Dec 16 2004 21:54:10 +0000 Subject: Add support for exposing not-in-charge constructors/destructors in the demangled names. --- diff --git a/gdb-6.3-constructor-20041216.patch b/gdb-6.3-constructor-20041216.patch new file mode 100644 index 0000000..1be5b64 --- /dev/null +++ b/gdb-6.3-constructor-20041216.patch @@ -0,0 +1,44 @@ +2004-12-16 Jeff Johnston + + * cp-demangle.c (d_print_comp): Add support for exposing + not-in-charge constructors/destructors in the demangled + names. + +--- gdb-6.3/libiberty/cp-demangle.c.fix Thu Dec 16 16:39:09 2004 ++++ gdb-6.3/libiberty/cp-demangle.c Thu Dec 16 16:39:37 2004 +@@ -2978,11 +2978,35 @@ d_print_comp (dpi, dc) + + case DEMANGLE_COMPONENT_CTOR: + d_print_comp (dpi, dc->u.s_ctor.name); ++ switch (dc->u.s_ctor.kind) ++ { ++ case gnu_v3_complete_object_ctor: ++ /* no decoration */ ++ break; ++ case gnu_v3_base_object_ctor: ++ d_append_string_constant (dpi, "$base"); ++ break; ++ case gnu_v3_complete_object_allocating_ctor: ++ d_append_string_constant (dpi, "$allocate"); ++ break; ++ } + return; + + case DEMANGLE_COMPONENT_DTOR: + d_append_char (dpi, '~'); + d_print_comp (dpi, dc->u.s_dtor.name); ++ switch (dc->u.s_dtor.kind) ++ { ++ case gnu_v3_deleting_dtor: ++ d_append_string_constant (dpi, "$delete"); ++ break; ++ case gnu_v3_complete_object_dtor: ++ /* no decoration */ ++ break; ++ case gnu_v3_base_object_dtor: ++ d_append_string_constant (dpi, "$base"); ++ break; ++ } + return; + + case DEMANGLE_COMPONENT_VTABLE: diff --git a/gdb.spec b/gdb.spec index 417e060..3e4252b 100644 --- a/gdb.spec +++ b/gdb.spec @@ -59,8 +59,6 @@ Patch50: gdb-6.1post-vsyscall-jul2004.patch #Broken: Patch52: gdb-6.1post-test-pie-nov2004.patch # Fix for allowing macros to continue after backtrace errors Patch78: gdb-6.1post-backtrace-nov2004.patch -# Fix to expose multiple constructors to end-user -Patch79: gdb-6.1post-constructor-nov2004.patch # Add --readnever hack, and gstack script #Broken: Patch82: gdb-6.1post-readnever-nov2004.patch # No longer a need to set .malloc on ppc64. @@ -124,8 +122,8 @@ Patch113: gdb-6.3-threaded-watchpoints-20041213.patch # Multiple patches to ia64 backtrace Patch114: gdb-6.3-ia64-backtrace-20041213.patch -# Fix to ensure types are visible -Patch115: gdb-6.3-type-fix-20041213.patch +# Fix to expose multiple constructors to end-user +Patch115: gdb-6.3-constructor-20041216.patch # Fix to display base constructors from list and breakpoint commands Patch116: gdb-6.3-linespec-20041213.patch @@ -140,6 +138,9 @@ Patch118: gdb-6.3-gstack-20041123.patch # Fix for caching thread lwps for linux Patch119: gdb-6.3-lwp-cache-20041216.patch +# Fix to ensure types are visible +Patch120: gdb-6.3-type-fix-20041213.patch + %ifarch ia64 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3 %else @@ -192,11 +193,11 @@ and printing their data. %patch117 -p1 %patch118 -p1 %patch119 -p1 +%patch120 -p1 %patch50 -p1 %patch78 -p1 -%patch79 -p1 # Change the version that gets printed at GDB startup, so it is RedHat # specific.