develooper Front page | perl.perl5.porters | Postings from September 2013

Re: A few Perl gdb debugging tools

Thread Previous | Thread Next
From:
wolfsage
Date:
September 30, 2013 14:09
Subject:
Re: A few Perl gdb debugging tools
Message ID:
CAJ0K8bhXWa=+aD01vSzsbHODABbxSCprQ_wQ9phpqj9JumNGAA@mail.gmail.com
On Sat, Sep 28, 2013 at 1:20 PM, Karl Williamson
<public@khwilliamson.com> wrote:
> On 09/26/2013 02:15 PM, Matthew Horsfall (alh) wrote:
>>
>> On Thu, Sep 26, 2013 at 3:42 PM, Father Chrysostomos <sprout@cpan.org>
>> wrote:
>>>
>>> Matthew Horsfall wrote:
>>>>
>>>> If there's a better way to do both of these things (prior art, simpler
>>>> tricks with gdb without needing external modules) please share.
>>>
>>>
>>> I use:
>>>
>>>      study;
>>>
>>> and:
>>>
>>>      BEGIN { study }
>>>
>>> and then:
>>>
>>>      (gdb) break Perl_pp_study
>>>
>>> :-)
>>>
>>
>> Ha ha, well played sir!
>>
>> I'll add a note to the modules saying "You probably want something
>> like this instead..."
>>
>> Thanks,
>>
>> -- Matthew Horsfall (alh)
>>
>
> Shouldn't this also be in perlhacktips?

How about the attached patch?

I'd be fine with removing the reference to my module if there's
another way to catch the Parser inside an if() statement, etc, but I
couldn't figure out how to get BEGIN { } to work inside:

 if ($a && $b && BEGIN { study; } && $d) { }

-- Matthew Horsfall (alh)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About