Skip to content

.mdebug parser failing on IDO 5.3/7.1 -g1, -g2, -g3 #272

Description

@Francessco121

objdiff is unable to correctly read the .mdebug section of object files compiled via IDO 5.3/7.1 with the flags -g1, -g2, and -g3. In these modes, IDO adds a ton of extra data to this section that seems to break the current parser.

Here's an example file compiled with -g0 (working) and -g3 (not working):
camstatic_g0.zip
camstatic_g3.zip
(the file is also compiled with -O2 -KPIC but it doesn't seem to matter, non -KPIC files also don't work)

Some files throw the error Failed to parse MIPS mdebug line info: range exceeds .mdebug size but usually it just silently fails.
Example file that emits that error (-g3, not -KPIC):
main.zip

mips-linux-gnu-objdump -drl correctly displays line numbers for these files, so the section doesn't appear to be corrupt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions