Skip to content

Commit

Permalink
Use composable attribute labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Warrick committed Jan 25, 2023
1 parent 684746c commit 16663ad
Show file tree
Hide file tree
Showing 22 changed files with 720 additions and 459 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 1.10.10 (Unreleased)
# 1.11.0 (Unreleased)

* TODO
Note that this release, due to changes to the protobuf definitions of symbolic
expression attributes, is backwards-incompatible with previous GTIRB files.

* Replace symbolic expression attributes with composable labels.

# 1.10.9

Expand Down
86 changes: 64 additions & 22 deletions cl/gtirb.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -756,32 +756,74 @@ Primitive accessor for byte-interval.")
(:documentation "Offset into a GTIRB object."))

(define-constant +se-attribute-flag-map+
'((#.proto:+se-attribute-flag-part0+ . :part0)
(#.proto:+se-attribute-flag-part1+ . :part1)
(#.proto:+se-attribute-flag-part2+ . :part2)
(#.proto:+se-attribute-flag-part3+ . :part3)
(#.proto:+se-attribute-flag-adjusted+ . :adjusted)
(#.proto:+se-attribute-flag-got-ref+ . :got-ref)
(#.proto:+se-attribute-flag-got-rel-pc+ . :got-rel-pc)
(#.proto:+se-attribute-flag-got-rel-got+ . :got-rel-got)
(#.proto:+se-attribute-flag-addr-rel-got+ . :addr-rel-got)
(#.proto:+se-attribute-flag-got-rel-addr+ . :got-rel-addr)
(#.proto:+se-attribute-flag-got-page+ . :got-page)
(#.proto:+se-attribute-flag-got-page-ofst+ . :got-page-ofst)
(#.proto:+se-attribute-flag-plt-ref+ . :plt-ref)
(#.proto:+se-attribute-flag-got-off+ . :got-off)
(#.proto:+se-attribute-flag-tp-off+ . :tp-off)
(#.proto:+se-attribute-flag-ntp-off+ . :ntp-off)
(#.proto:+se-attribute-flag-dtp-off+ . :dtp-off)
(#.proto:+se-attribute-flag-tls-gd+ . :tls-gd)
(#.proto:+se-attribute-flag-tls-ld+ . :tls-ld)
'(
(#.proto:+se-attribute-flag-got+ . :got)
(#.proto:+se-attribute-flag-gotpc+ . :gotpc)
(#.proto:+se-attribute-flag-gotoff+ . :gotoff)
(#.proto:+se-attribute-flag-gotrel+ . :gotrel)
(#.proto:+se-attribute-flag-plt+ . :plt)
(#.proto:+se-attribute-flag-pltoff+ . :pltoff)
(#.proto:+se-attribute-flag-pcrel+ . :pcrel)
(#.proto:+se-attribute-flag-secrel+ . :secrel)
(#.proto:+se-attribute-flag-tls+ . :tls)
(#.proto:+se-attribute-flag-tlsgd+ . :tlsgd)
(#.proto:+se-attribute-flag-tlsld+ . :tlsld)
(#.proto:+se-attribute-flag-tlsldm+ . :tlsldm)
(#.proto:+se-attribute-flag-tlscall+ . :tlscall)
(#.proto:+se-attribute-flag-tlsdesc+ . :tlsdesc)
(#.proto:+se-attribute-flag-tprel+ . :tprel)
(#.proto:+se-attribute-flag-tpoff+ . :tpoff)
(#.proto:+se-attribute-flag-dtprel+ . :dtprel)
(#.proto:+se-attribute-flag-dtpoff+ . :dtpoff)
(#.proto:+se-attribute-flag-dtpmod+ . :dtpmod)
(#.proto:+se-attribute-flag-ntpoff+ . :ntpoff)
(#.proto:+se-attribute-flag-page+ . :page)
(#.proto:+se-attribute-flag-pageoff+ . :pageoff)
(#.proto:+se-attribute-flag-call+ . :call)
(#.proto:+se-attribute-flag-lo+ . :lo)
(#.proto:+se-attribute-flag-hi+ . :hi)
(#.proto:+se-attribute-flag-higher+ . :higher)
(#.proto:+se-attribute-flag-highest+ . :highest)
(#.proto:+se-attribute-flag-gotntpoff+ . :gotntpoff)
(#.proto:+se-attribute-flag-indntpoff+ . :indntpoff)
(#.proto:+se-attribute-flag-g0+ . :g0)
(#.proto:+se-attribute-flag-g1+ . :g1)
(#.proto:+se-attribute-flag-g2+ . :g2)
(#.proto:+se-attribute-flag-g3+ . :g3)
(#.proto:+se-attribute-flag-upper16+ . :upper16)
(#.proto:+se-attribute-flag-lower16+ . :lower16)
(#.proto:+se-attribute-flag-lo12+ . :lo12)
(#.proto:+se-attribute-flag-lo15+ . :lo15)
(#.proto:+se-attribute-flag-lo14+ . :lo14)
(#.proto:+se-attribute-flag-hi12+ . :hi12)
(#.proto:+se-attribute-flag-hi21+ . :hi21)
(#.proto:+se-attribute-flag-s+ . :s)
(#.proto:+se-attribute-flag-pg+ . :pg)
(#.proto:+se-attribute-flag-nc+ . :nc)
(#.proto:+se-attribute-flag-abs+ . :abs)
(#.proto:+se-attribute-flag-signed+ . :signed)
(#.proto:+se-attribute-flag-no-overflow-check+ . :no-overflow-check))
:test #'equal)
(#.proto:+se-attribute-flag-prel+ . :prel)
(#.proto:+se-attribute-flag-prel31+ . :prel31)
(#.proto:+se-attribute-flag-target1+ . :target1)
(#.proto:+se-attribute-flag-target2+ . :target2)
(#.proto:+se-attribute-flag-sbrel+ . :sbrel)
(#.proto:+se-attribute-flag-tlsldo+ . :tlsldo)
(#.proto:+se-attribute-flag-hi16+ . :hi16)
(#.proto:+se-attribute-flag-lo16+ . :lo16)
(#.proto:+se-attribute-flag-gprel+ . :gprel)
(#.proto:+se-attribute-flag-disp+ . :disp)
(#.proto:+se-attribute-flag-ofst+ . :ofst)
(#.proto:+se-attribute-flag-h+ . :h)
(#.proto:+se-attribute-flag-l+ . :l)
(#.proto:+se-attribute-flag-ha+ . :ha)
(#.proto:+se-attribute-flag-high+ . :high)
(#.proto:+se-attribute-flag-higha+ . :higha)
(#.proto:+se-attribute-flag-highera+ . :highera)
(#.proto:+se-attribute-flag-highesta+ . :highesta)
(#.proto:+se-attribute-flag-tocbase+ . :tocbase)
(#.proto:+se-attribute-flag-toc+ . :toc)
(#.proto:+se-attribute-flag-notoc+ . :notoc))
:test #'equal
:documentation "See doc/general/SymbolicExpression.md for more details.")

(define-proto-backed-class (byte-interval proto:byte-interval) ()
((blocks :initarg :blocks :accessor blocks :type list
Expand Down
Loading

0 comments on commit 16663ad

Please sign in to comment.