From: Gerald Pfeifer Date: Fri, 16 Feb 2001 11:12:46 +0000 (+0100) Subject: gdbinit: Rename to gdbinit.in. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc06d68c8c854a3f1394da9dc0eb5365de5f6d71;p=gcc.git gdbinit: Rename to gdbinit.in. * .gdbinit: Rename to gdbinit.in. * gdbinit.in: New file, * configure.in: Generate .gdbinit from gdbinit.in. * configure: Regenerated. * Makefile.in (distclean): Always remove .gdbinit. From-SVN: r39759 --- diff --git a/gcc/.gdbinit b/gcc/.gdbinit deleted file mode 100644 index ccc3ad8787f..00000000000 --- a/gcc/.gdbinit +++ /dev/null @@ -1,102 +0,0 @@ -define pr -set debug_rtx ($) -end - -document pr -Print the full structure of the rtx that is $. -Works only when an inferior is executing. -end - -define prl -set debug_rtx_list ($, debug_rtx_count) -end - -document prl -Print the full structure of all rtx insns beginning at $. -Works only when an inferior is executing. -Uses variable debug_rtx_count to control number of insns printed: - debug_rtx_count > 0: print from $ on. - debug_rtx_count < 0: print a window around $. - -There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print -it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42) -end - -define pt -set debug_tree ($) -end - -document pt -Print the full structure of the tree that is $. -Works only when an inferior is executing. -end - -define ptc -output (enum tree_code) $.common.code -echo \n -end - -document ptc -Print the tree-code of the tree node that is $. -end - -define pdn -output $.decl.name->identifier.pointer -echo \n -end - -document pdn -Print the name of the decl-node that is $. -end - -define ptn -output $.type.name->decl.name->identifier.pointer -echo \n -end - -document ptn -Print the name of the type-node that is $. -end - -define prc -output (enum rtx_code) $.code -echo \ ( -output $.mode -echo )\n -end - -document prc -Print the rtx-code and machine mode of the rtx that is $. -end - -define pi -print $.fld[0].rtx@7 -end - -document pi -Print the fields of an instruction that is $. -end - -define pbs -set print_binding_stack () -end - -document pbs -In cc1plus, print the current binding stack, frame by frame, up to and -including the global binding level. -end - -# Put breakpoints at exit and fancy_abort in case abort is mapped -# to either fprintf/exit or fancy_abort. -b exit -b fancy_abort - -# Make gdb complain about symbol reading errors. This is so that gcc -# developers can see and fix bugs in gcc debug output. -set complaints 20 - -# Don't let abort actually run, as it will make -# stdio stop working and therefore the `pr' command above as well. -# Put this last because gcc does not reference it any more unless -# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out. -b abort diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8181ef6860..abe8ba769b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-02-16 Gerald Pfeifer + + * .gdbinit: Rename to gdbinit.in. + * gdbinit.in: New file, + * configure.in: Generate .gdbinit from gdbinit.in. + * configure: Regenerated. + * Makefile.in (distclean): Always remove .gdbinit. + 2001-02-16 Jakub Jelinek * objc/objc-act.c (start_class): Register implemented_classes with diff --git a/gcc/Makefile.in b/gcc/Makefile.in index a78183ef931..304fbd13bf5 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2363,7 +2363,7 @@ distclean: clean $(INTL_DISTCLEAN) lang.distclean -rm -f testsuite/{gcc,g++}.{log,sum} -rm -f intl/libintl.h libintl.h -rm -f cxxmain.c splay-tree.c obstack.c alloca.c hashtab.c safe-ctype.c - -rm -f mklibgcc libgcc.map gccbug configargs.h + -rm -f mklibgcc libgcc.map gccbug .gdbinit configargs.h -rm -f gcov.pod -rm -f fixinc/Makefile -rmdir cp f java objc fixinc intl po 2>/dev/null diff --git a/gcc/configure b/gcc/configure index c6ab580dbcc..e30f26511aa 100755 --- a/gcc/configure +++ b/gcc/configure @@ -6670,23 +6670,21 @@ do echo "lang.$t: $x" >> Make-hooks done -# If we're not building in srcdir, create .gdbinit. +# Create .gdbinit. -if test ! -f Makefile.in; then - echo "dir ." > .gdbinit - echo "dir ${srcdir}" >> .gdbinit - if test x$gdb_needs_out_file_path = xyes - then - echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit - fi - if test "x$subdirs" != x; then - for s in $subdirs - do - echo "dir ${srcdir}/$s" >> .gdbinit - done - fi - echo "source ${srcdir}/.gdbinit" >> .gdbinit +echo "dir ." > .gdbinit +echo "dir ${srcdir}" >> .gdbinit +if test x$gdb_needs_out_file_path = xyes +then + echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit +fi +if test "x$subdirs" != x; then + for s in $subdirs + do + echo "dir ${srcdir}/$s" >> .gdbinit + done fi +echo "source ${srcdir}/gdbinit.in" >> .gdbinit # Define variables host_canonical and build_canonical # because some Cygnus local changes in the Makefile depend on them. diff --git a/gcc/configure.in b/gcc/configure.in index 59387926084..26d9e1e4317 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -1707,23 +1707,21 @@ do echo "lang.$t: $x" >> Make-hooks done -# If we're not building in srcdir, create .gdbinit. +# Create .gdbinit. -if test ! -f Makefile.in; then - echo "dir ." > .gdbinit - echo "dir ${srcdir}" >> .gdbinit - if test x$gdb_needs_out_file_path = xyes - then - echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit - fi - if test "x$subdirs" != x; then - for s in $subdirs - do - echo "dir ${srcdir}/$s" >> .gdbinit - done - fi - echo "source ${srcdir}/.gdbinit" >> .gdbinit +echo "dir ." > .gdbinit +echo "dir ${srcdir}" >> .gdbinit +if test x$gdb_needs_out_file_path = xyes +then + echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit +fi +if test "x$subdirs" != x; then + for s in $subdirs + do + echo "dir ${srcdir}/$s" >> .gdbinit + done fi +echo "source ${srcdir}/gdbinit.in" >> .gdbinit # Define variables host_canonical and build_canonical # because some Cygnus local changes in the Makefile depend on them. diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in new file mode 100644 index 00000000000..ccc3ad8787f --- /dev/null +++ b/gcc/gdbinit.in @@ -0,0 +1,102 @@ +define pr +set debug_rtx ($) +end + +document pr +Print the full structure of the rtx that is $. +Works only when an inferior is executing. +end + +define prl +set debug_rtx_list ($, debug_rtx_count) +end + +document prl +Print the full structure of all rtx insns beginning at $. +Works only when an inferior is executing. +Uses variable debug_rtx_count to control number of insns printed: + debug_rtx_count > 0: print from $ on. + debug_rtx_count < 0: print a window around $. + +There is also debug_rtx_find (rtx, uid) that will scan a list for UID and print +it using debug_rtx_list. Usage example: set $foo=debug_rtx_find(first, 42) +end + +define pt +set debug_tree ($) +end + +document pt +Print the full structure of the tree that is $. +Works only when an inferior is executing. +end + +define ptc +output (enum tree_code) $.common.code +echo \n +end + +document ptc +Print the tree-code of the tree node that is $. +end + +define pdn +output $.decl.name->identifier.pointer +echo \n +end + +document pdn +Print the name of the decl-node that is $. +end + +define ptn +output $.type.name->decl.name->identifier.pointer +echo \n +end + +document ptn +Print the name of the type-node that is $. +end + +define prc +output (enum rtx_code) $.code +echo \ ( +output $.mode +echo )\n +end + +document prc +Print the rtx-code and machine mode of the rtx that is $. +end + +define pi +print $.fld[0].rtx@7 +end + +document pi +Print the fields of an instruction that is $. +end + +define pbs +set print_binding_stack () +end + +document pbs +In cc1plus, print the current binding stack, frame by frame, up to and +including the global binding level. +end + +# Put breakpoints at exit and fancy_abort in case abort is mapped +# to either fprintf/exit or fancy_abort. +b exit +b fancy_abort + +# Make gdb complain about symbol reading errors. This is so that gcc +# developers can see and fix bugs in gcc debug output. +set complaints 20 + +# Don't let abort actually run, as it will make +# stdio stop working and therefore the `pr' command above as well. +# Put this last because gcc does not reference it any more unless +# USE_SYSTEM_ABORT is defined, so gdb may complain and bail out. +b abort