Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

optree debugger?
Working on the fixes for the B::C perl compiler I wondered why nobody so
far considered writing an B::Debugger, an optree debugger.
I need that to debug my various B compiler modules, which I hate to
debug on the C level, gdb or insight.

It's pretty simple hooking into the CHECK or INIT block and setting up a
simple read-eval-print loop there. And well, you have got an interactive
B::Concise.

So I started writing one. First as XS module, then as PM module.
It doesn't work yet, but I wondered if someone knows more, why and how
and esp. why not.

If not, I want to reserve this namespace B::Debugger for me and upload
it to CPAN.

rurban at cpan.org

The idea is like this:

use B qw(main_start); use Devel::Hook;
sub init_debugger_loop {
debugger_walkoptree(main_root, \&debugger_prompt, main_root);
}
BEGIN {
Devel::Hook->push_INIT_hook( \&init_debugger_loop );
}

$ perl -MB::Debugger program.pl
B::Debugger 0.01 - optree debugger. h for help
> h
Usage:
n     next op         op <n>  inspect op
c <n> continue          next  next op
b <n> break at step     type  type
l     list              flags flags of current op
x ..  execute         [SAHPICG]V<n> inspect n-th global variable
h     help            F,Flags   B::Flags of current op
q     quit            C,Concise B::Concise of current op
> b 1
breakpoint 1 added
> l
<should B::OP::debug list the next ops>
> c
<should break at next op, starting with op 0>
> q
quit
executing...

Report this thread to moderator Post Follow-up to this message
Old Post
Reini Urban
03-16-08 12:07 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:54 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.