Search code examples
parsingdisassemblyobjdump

Prevent objdump from wrapping long lines


When using objdump, I often get lines like these:

a0df:   c7 05 58 4b 02 00 00    mov    DWORD PTR ds:0x24b58,0x6400
a0e6:   64 00 00 
...
a2da:   f7 05 6c 4b 02 00 ff    test   DWORD PTR ds:0x24b6c,0xffffffff
a2e1:   ff ff ff 

What I'd like to get instead is:

a0df:   c7 05 58 4b 02 00 00 64 00 00   mov    DWORD PTR ds:0x24b58,0x6400
...
a2da:   f7 05 6c 4b 02 00 ff ff ff ff   test   DWORD PTR ds:0x24b6c,0xffffffff

Is is possible to tell objdump not to wrap those lines?


Solution

  • Found it myself. I was looking for something named wrap, but the parameter that controls this is somewhat disguised as '-w/--wide':

       -w
       --wide
           Format some lines for output devices that have more than 80 columns.  
           Also do not truncate symbol names when they are displayed.