I guess that the argument of the user defined command in gdbinit.in
should be $arg0. Also, due to the changes of the structure tree node,
ptc should be,

 define ptc
-output (enum tree_code) $.common.code
+output (enum tree_code) $arg0.base.code
 echo \n
 end

Here's the patch,

--- gcc/gdbinit.in      2008-01-23 14:09:33.000000000 +0800
+++ temp/gdbinit.in     2008-01-23 13:36:24.000000000 +0800
@@ -1,107 +1,107 @@
 define pr
-set debug_rtx ($)
+set debug_rtx ($arg0)
 end

 document pr
-Print the full structure of the rtx that is $.
+Print the full structure of the rtx that is $arg0.
 Works only when an inferior is executing.
 end

 define prl
-set debug_rtx_list ($, debug_rtx_count)
+set debug_rtx_list ($arg0, debug_rtx_count)
 end

 document prl
-Print the full structure of all rtx insns beginning at $.
+Print the full structure of all rtx insns beginning at $arg0.
 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 $.
+  debug_rtx_count > 0: print from $arg0 on.
+  debug_rtx_count < 0: print a window around $arg0.

 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 ($)
+set debug_tree ($arg0)
 end

 document pt
-Print the full structure of the tree that is $.
+Print the full structure of the tree that is $arg0.
 Works only when an inferior is executing.
 end

 define pct
-set debug_c_tree ($)
+set debug_c_tree ($arg0)
 end

 document pct
-Print the tree that is $ in C syntax.
+Print the tree that is $arg0 in C syntax.
 Works only when an inferior is executing.
 end

 define pgs
-set debug_generic_stmt ($)
+set debug_generic_stmt ($arg0)
 end

 document pgs
-Print the statement that is $ in C syntax.
+Print the statement that is $arg0 in C syntax.
 Works only when an inferior is executing.
 end

 define pge
-set debug_generic_expr ($)
+set debug_generic_expr ($arg0)
 end

 document pge
-Print the expression that is $ in C syntax.
+Print the expression that is $arg0 in C syntax.
 Works only when an inferior is executing.
 end

 define ptc
-output (enum tree_code) $.common.code
+output (enum tree_code) $arg0.base.code
 echo \n
 end

 document ptc
-Print the tree-code of the tree node that is $.
+Print the tree-code of the tree node that is $arg0.
 end

 define pdn
-output $.decl_minimal.name->identifier.id.str
+output $arg0.decl_minimal.name->identifier.id.str
 echo \n
 end

 document pdn
-Print the name of the decl-node that is $.
+Print the name of the decl-node that is $arg0.
 end

 define ptn
-output $.type.name->decl_minimal.name->identifier.id.str
+output $arg0.type.name->decl_minimal.name->identifier.id.str
 echo \n
 end

 document ptn
-Print the name of the type-node that is $.
+Print the name of the type-node that is $arg0.
 end

 define prc
-output (enum rtx_code) $.code
+output (enum rtx_code) $arg0.code
 echo \ (
-output $.mode
+output $arg0.mode
 echo )\n
 end

 document prc
-Print the rtx-code and machine mode of the rtx that is $.
+Print the rtx-code and machine mode of the rtx that is $arg0.
 end

 define pi
-print [EMAIL PROTECTED]
+print [EMAIL PROTECTED]
 end

 document pi
-Print the fields of an instruction that is $.
+Print the fields of an instruction that is $arg0.
 end

 define pbs
@@ -114,19 +114,19 @@ including the global binding level.
 end

 define pbb
-set dump_bb ($, stderr, 0)
+set dump_bb ($arg0, stderr, 0)
 end

 document pbb
-Dump the basic block that is in $, including rtx.
+Dump the basic block that is in $arg0, including rtx.
 end

 define pbm
-set bitmap_print (stderr, $, "", "\n")
+set bitmap_print (stderr, $arg0, "", "\n")
 end

 document pbm
-Dump the bitmap that is in $ as a comma-separated list of numbers.
+Dump the bitmap that is in $arg0 as a comma-separated list of numbers.
 end

 # Put breakpoints at exit and fancy_abort in case abort is mapped

Reply via email to