[llvm-commits] PATCH: add new test tool: obj2yaml

Marshall Clow mclow.lists at gmail.com
Tue Jun 12 08:35:02 PDT 2012


On Jun 9, 2012, at 2:44 AM, Michael Spencer wrote:

> On Fri, Jun 8, 2012 at 11:09 AM, Marshall Clow <mclow.lists at gmail.com> wrote:
>> [ resending to llvm-commits instead of -dev ]
>> 
>> This patch adds a tool called 'obj2yaml', which takes an object file, and produces a YAML representation of the file.
>> This is a companion tool to Michael Spencer's proposed "yaml2obj" tool.
>> 
>> This tool processes only COFF files; the plan is to enhance it to handle other object formats, as well as object archives.
>> The primary uses for this tool is expected to be:
>>        1) Debugging object files that are produced by llvm and lld.
>>        2) Automated testing suites.
>> 
>> The goal is to have obj2yaml and yaml2obj be inverse operations, so that one can test either by using the other.
>> So, both obj -> yaml -> obj and yaml -> obj -> yaml are expected to be idempotent.
>> 
>> -- Marshall
>> 
>> Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>
>> 
>> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
>>       -- Yu Suzuki
> 
> The design looks good, however there are quite a few LLVM style issues.

Extensively reworked. Now uses the facilities in llvm/Object/COFF.h for byte-sex awareness.
Still a few 80 column issues, and the relocation dumping is not done - but since yaml2obj doesn't build relocation entries yet, this may be moot. ;-)

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: obj2yaml-2.patch
Type: application/octet-stream
Size: 16859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120612/646b883f/attachment.obj>


More information about the llvm-commits mailing list