This is an archive of the discontinued LLVM Phabricator instance.

Move postfix expression code out of the NativePDB plugin
ClosedPublic

Authored by labath on Apr 12 2019, 1:45 AM.

Details

Summary

The NativePDB plugin contains code to convert "programs" describing the
layout of function frames into dwarf (for easier interaction with the
rest of lldb). This functionality is useful for the Breakpad plugin too,
as it contains the same kind of expressions (because breakpad info is
generated from pdb files).

In this patch, I move the core classes of this code into a common place,
where it can be used from both files. Previously, these were the details
of the implementation, but here I am exposing them (instead of just a
single "string->string" conversion function), as breakpad will need to
use these in a slightly different way. The reason for that is that
breakpad files generated from dwarf expressions use a slightly different
syntax, although most of the core code can be reused with a bit of
thought.

This is also the reason why I am not moving the parsing or dwarf
generation bits, as they will need to be generalized a bit before
they're usable for both scenarios.

This patch should be NFC, modulo renaming the moved entities to more
neutral names.

The reason I am moving this to the "Symbol" library, is because both
customers will be "Symbol"Files, and also the unwinding code lives in
the Symbol library. From a purely dependency standpoint this code will
probably be standalone, and so it could be moved all the way to Utility,
but that seems too low for this kind of functionality.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

labath created this revision.Apr 12 2019, 1:45 AM

Makes sense, LGTM

Sorry for the long delay with the response, I had days off. LGTM, thanks!

This revision is now accepted and ready to land.Apr 14 2019, 11:02 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 23 2019, 4:48 AM
Herald added a subscriber: abidh. · View Herald Transcript