From: Jarkko Hietaniemi Date: Sun, 29 Jun 2003 13:47:36 +0000 (+0000) Subject: More on the macro debugging and expansion. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=52d59bef96c881381bce1bcb84a8c08ce48c2544;p=p5sagit%2Fp5-mst-13.2.git More on the macro debugging and expansion. p4raw-id: //depot/perl@19883 --- diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 60653e1..0169280 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1216,6 +1216,14 @@ important ones are explained in L as well. Pay special attention to L for information on the C<[pad]THX_?> macros. +=head2 The .i Targets + +You can expand the macros in a F file by saying + + make foo.i + +which will expand the macros using cpp. Don't be scared by the results. + =head2 Poking at Perl To really poke around with Perl, you'll probably want to build Perl for @@ -1309,8 +1317,11 @@ blessing when stepping through miles of source code. =item print Execute the given C code and print its results. B: Perl makes -heavy use of macros, and F is not aware of macros. You'll have to -substitute them yourself. So, for instance, you can't say +heavy use of macros, and F does not necessarily support macros +(see later L). You'll have to substitute them +yourself, or to invoke cpp on the source code files +(see L) +So, for instance, you can't say print SvPV_nolen(sv) @@ -1320,9 +1331,11 @@ but you have to say You may find it helpful to have a "macro dictionary", which you can produce by saying C. Even then, F won't -recursively apply the macros for you. +recursively apply those macros for you. + +=head2 gdb macro support -B: Recent versions of F have fairly good macro support, but +Recent versions of F have fairly good macro support, but in order to use it you'll need to compile perl with macro definitions included in the debugging information. Using F version 3.1, this means configuring with C<-Doptimize=-g3>. Other compilers might use a