Gone Awry Goes Kindle, artist’s ebook on amazon

libabigail aka C++ Instrumentation and Analysis


Background

Libabigail is shorthand for the alternative, which just so happens to be a bit of a mouthful: “GNU Application Binary Interface Generic Analysis and Instrumentation Library.”

This is a current compiler/language research topic to provide a serialized XML form of C++11 sources as compiled by GNU g++, and a way of looking at the data produced. This data can be parsed to more accurately determine ABI compatibility, to better understand code additions and changes and how these change the exported interface, to examine and prototype how C++11 language usage determines linkage, etc.

Discussions about this functionality started at the “C++ ABI BOF” at the GNU Tools Cauldron 2012 Prague. This work was created at Red Hat, by Benjamin Kosnik, Jason Merrill, and Dodji Seketeli. Some updates at 2013 Cauldron. See “Cauldron 2013 GCC ABI BOF.”

Development sources are written in mixed C++2003/C++11, hosted in git, based on GCC trunk, and tracking what will to be gcc-4.9.0. The branch is administered by Dodji Seketeli.

Please feel free to try it out, but know that the state is experimental and quite raw.

Feedback and assistance is welcome.

Starting from a git working tree as described in GitMirror, add the libabigail repository as follows:

git checkout -b libabigail origin/libabigail

To stay up to date, use:

git pull


Overview

How is this expected to be used? First, a libabigail top-level directory is either added to the GCC sources or compiled as a first step and put into some PREFIX directory. The GNU C++ compiler, g++, is configured to use this new library with:

configure .. --with-abigail=$PREFIX

Thus configured, the C++ front end is built, installed, and used as the primary compiler. All sources are compiled with an additional flag, -fdump-abi.

So, this command:

g++ -c -fdump-abi somefile.cc

Creates two files:

  • somefile.o

    The object file

  • somefile.cc.bi

    The XML instrumentation file


API/ABI

basics

Toplevel namespace is abigail.

The interface header files in libabigail:

abg-ir.h
abg-corpus.h

Doxgen is used to document the sources: try make html to generate, and look in libabigail-build-dir/doc/api/html/index.html to read it.

And then the binary interface is in libabigail.so.

notes

Each object file is compiled to a translation_unit. The sum of all translation_units is a corpus.

Compiler-generated files are read as serialized input to a translation_unit and de-serialized. And any modified form is written to an output file in serialized form.

The interface to the C++ intermediate representation is best viewed in the class documentation.

Opinions and Wild Guesses

1. Some formatting tips.

– classes “read” as types, data, members functions. In that order.

– doxygen gives feedback on the state of the doxygen parse in the form of a log, as you run “make html.” Read this log: doxygen is a fuzzy parse. There are formatting things you can do to make it better. Do them. It’s easier to fix up these errors then figure out why the generated HTML is poor.

2. Use of shared_ptr is intriguing.

There are not really a lot of existing usage patterns for std::shared_ptr in libstdc++ (in C++11 , , ). If you look at the page of boost idioms for shared_ptr usage:

http://www.boost.org/doc/libs/1_54_0/libs/smart_ptr/sp_techniques.html

One notices that there’s not a lot of use of shared_ptrs in interfaces. Yet in libabigail, that is very common. I’m curious about this style question.

And most usage is up for debate, see this stack overthow discussion about using shared_ptrs as function arguments. Should the parameters be const reference or just shared_ptr? And another.

Some interesting thinking from microsoft on shared_ptr usage.

3. Use of virtual binary operators is odd.

The old adage is that operators cause havoc in overload resolution. These are binary operators, but the stigma lingers. A vague feeling is not the same as something definite that’s a hard no. It’s more like the pirate code than a strict coding convention or hard rule. I would say that if you ever start to see strange bugs due to overloading, consider making these (non-operator) functions.

Otherwise, do it.

Asama OG x Nezu Museum x Birgit Skiold

teahouse_stone_enso.6.1

teahouse_stone_enso.6.2

teahouse_stone_enso.6.0

teahouse_stone_enso.6.3

Protocol

Three visual allies cross space and time to meet for the first time at the Pacific Portal, 2013. Devastation Pacific, San Francisco, California, United States, Earth. At contact, self-identify as allies, murmur these are my people, make plans for a hybrid form.

COMBINE.

FUSE.

Set of four stone ensos with guilloche overlays, constructed via the lens of a slow walk through the Nezu Museum teahouse gardens, and committed to copper plates via direct gravure during Crown Point Press 2013 Summer Workshop.

Production Notes

Image Size
329 x 493mm (13 x 19 inches)

Plate Size
329 x 493mm (14 x 22 inches), .041in mirror polished copper plate

Finished Size
90mm borders x 4 sides means approximately 510 x 660mm (20 x 26in)

Plate 0: Zero
Scrap metal, found discard. Backside. Hand filed, uneven: “4eva.” Cancellation mark, “X,” top left of plate. Some Capp street sidewalk surfing scratches at two edges. Modified aquatint with surfer resin drops. Circle, brush, and drip spitbite.
Color: hottest pink || orange-y sepia || 20% prussian

  1. Pink Actual: Charbonnel Solferino Violet (~70%), Charbonnel Rouge Rubis/Ruby “Heart Stealer” Red (~30%), Douglas and Sturges Luster Pigment Pearl White, Douglas and Stuges Bronzing Powder Silvertone, Faust transparent base 2:1
  2. Orange Actual: Charbonnel Cardinal Red (~70%), Charbonnel Apricot Yellow, Douglas and Stuges Bronzing Powder Silvertone, Faust transparent base 2:1
  3. Blue Actual: Charbonnel Prussian Blue, white (~70%), Faust transparent base 1:1

Plate 1: One
One of 4 stone ensos. Direct gravure. Inkscape vector image composition with photo image collage. Photo tinting in photoshop to 2010 curves. Linux higest-resolution-possible-config to Epson 3880 (F18 adair create/F14 chula print configuration). Phoenix Gravure Pigment Paper.
Color: Black, silver, rust.
Color Actual: Charbonnel Black, Faust transparent base 1:1 to less.

Plate 2: Two
One of 3 deboss plates. Deboss/Emboss plates inspired by Birgit Skiold’s “Zen Gardens.” Copper plate, 0.041in scrap metal, discard. Flowjet cutting via TechShop, and the kind help of various mechanical engineering SF Techshop-ians! See Flowjet WaterJet aces, aka, CNC401: CNC Waterjet Cutter SBU – Level 4.

Paper
Somerset Velvet Soft White 300g
HM-63 Mohachi 300g (22 x 30″)
MMN-106 Torinoko Black 235g (38 x 74″)
Unknown Hiromi Dark Natural Gampi

The Master Technician
Etching consigliere Ianne Kjorli.

Links
Some printed pieces. Some background on the layering and combinations.

Ambient

Supreme court strikes down Doma on historic day for gay rights in America
SOMM, the new “Jiro Dreams of Sushi
Sans Soleil, Chris Marker
Royal Space Force/Wings of Honnêamise
Daft Punk, Duh
Lianne La Havas, No Room For Doubt
Joshua Redmond
Spring Breakers, crime art movie
Bling Ring, see above
Epic hating on pinterist
Mourning canceled shows that should have been on TNT, or made with animatronics.

Research Notes

Nezu Museum, Tokyo, Japan
Birgit Skiold, for those who don’t know Swedish pronunciation, Kathan Brown indicates this can be sounded out as “Beer-git Skee-old”
Blythe House Reading Room, Victoria and Albert Museum, London, UK. See the “Zen and the Art of Print: Birgit Skiold and Japan” show, and “Birgit Skiöld and the Print Workshop” for background on London’s first open-access print workshop.
Anish Kapoor, Untitled
Anish Kapoor, Untiled A