This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Update frame regex matcher
ClosedPublic

Authored by mib on Aug 2 2022, 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.Aug 2 2022, 4:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2022, 4:34 PM
mib requested review of this revision.Aug 2 2022, 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.Aug 3 2022, 11:11 AM
lldb/examples/python/crashlog.py
606

I like this idea (and learned something new)

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

+1, thanks @kastiglione !

mib updated this revision to Diff 449785.Aug 3 2022, 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.Aug 3 2022, 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.Aug 4 2022, 10:35 AM

Add test

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