Page MenuHomePhabricator

[lldb/crashlog] Update frame regex matcher
ClosedPublic

Authored by mib on Tue, Aug 2, 4:34 PM.

Details

Summary

This patch updates the regular expression matching stackframes in
crashlog to allow addresses that are 7 characters long and more (vs. 8
characters previously).

It changes the 0x[0-9a-fA-F]{7}[0-9a-fA-F]+ by 0x[0-9a-fA-F]{7,}.

rdar://97684839

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Tue, Aug 2, 4:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 2, 4:34 PM
mib requested review of this revision.Tue, Aug 2, 4:34 PM
kastiglione added inline comments.
lldb/examples/python/crashlog.py
606

Can it be simplified to using {7,}, for "7 or more"?

Ex: r'(0x[0-9a-fA-F]{7,}

JDevlieghere added inline comments.Wed, Aug 3, 11:11 AM
lldb/examples/python/crashlog.py
606

I like this idea (and learned something new)

mib added inline comments.Wed, Aug 3, 11:16 AM
lldb/examples/python/crashlog.py
606

+1, thanks @kastiglione !

mib updated this revision to Diff 449785.Wed, Aug 3, 2:25 PM
mib marked 2 inline comments as done.
mib edited the summary of this revision. (Show Details)

Implement @kastiglione's suggestion

Can we test this by modifying an address in the existing test case?

mib added a comment.Wed, Aug 3, 4:23 PM

Can we test this by modifying an address in the existing test case?

Sure but we won't be able to symbolicate that frame anymore ... do we really want to do that ?

Can we test this by modifying an address in the existing test case?

Sure but we won't be able to symbolicate that frame anymore ... do we really want to do that ?

I think that's a fair trade-off to get regression coverage.

mib updated this revision to Diff 450053.Thu, Aug 4, 10:35 AM

Add test

This revision is now accepted and ready to land.Mon, Aug 8, 11:51 AM
This revision was automatically updated to reflect the committed changes.