diff options
author | Stas Bekman <stas@stason.org> | 2002-03-11 22:54:31 +0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-12 17:22:49 +0000 |
commit | b8ddf6b3bbc3a2d356d8675d6aa8242e26398224 (patch) | |
tree | 1362e210ed6f94d738ff79401bc0be33abd30151 /pod | |
parent | d63e6bb677100b30865b160fc265e1ad59f01ad6 (diff) | |
download | perl-b8ddf6b3bbc3a2d356d8675d6aa8242e26398224.tar.gz |
perl datastructure conversion shortcuts for DDD
Message-ID: <3C8C54A7.5020502@stason.org>
p4raw-id: //depot/perl@15206
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlhack.pod | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 79905bbdc4..85c2944499 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1249,7 +1249,6 @@ important ones are explained in L<perlxs> as well. Pay special attention to L<perlguts/Background and PERL_IMPLICIT_CONTEXT> for information on the C<[pad]THX_?> macros. - =head2 Poking at Perl To really poke around with Perl, you'll probably want to build Perl for @@ -2192,6 +2191,47 @@ Unexecuted procedures. For further information, see your system's manual pages for pixie and prof. +=head2 Miscellaneous tricks + +=over 4 + +=item * + +hose debugging perl with the DDD frontend over gdb may find the +following useful: + +You can extend the data conversion shortcuts menu, so for example you +can display an SV's IV value with one click, without doing any typing. +To do that simply edit ~/.ddd/init file and add after: + + ! Display shortcuts. + Ddd*gdbDisplayShortcuts: \ + /t () // Convert to Bin\n\ + /d () // Convert to Dec\n\ + /x () // Convert to Hex\n\ + /o () // Convert to Oct(\n\ + +the following two lines: + + ((XPV*) (())->sv_any )->xpv_pv // 2pvx\n\ + ((XPVIV*) (())->sv_any )->xiv_iv // 2ivx + +so now you can do ivx and pvx lookups or you can plug there the +sv_peek "conversion": + + Perl_sv_peek(my_perl, (SV*)()) // sv_peek + +(The my_perl is for threaded builds.) +Just remember that every line, but the last one, should end with \n\ + +Alternatively edit the init file interactively via: +3rd mouse button -> New Display -> Edit Menu + +Note: you can define up to 20 conversion shortcuts in the gdb +section. + +=back + =head2 CONCLUSION We've had a brief look around the Perl source, an overview of the stages |