[PATCH] gas: Add --gcodeview option

Mark Harmstone mark@harmstone.com
Tue Nov 22 02:45:59 GMT 2022


On 21/11/22 14:53, Nick Clifton wrote:
> Hi Mark,
>
>> This patch adds a --gcodeview option to as, which causes it to emit a
>> .debug$S section with line number details in Microsoft's CodeView
>> format. My upcoming PDB patches to ld will parse these so they can be
>> read by windbg etc.
>
> I encountered one new assembler testsuite failure whilst testing this
> patch locally:
>
>   FAIL: Failed to extract .debug$S section from codeview1.o
>
> The lines before it showed a confusing error message:
>
>   Executing on host: sh -c {objcopy --dump-section .debug\$S=tmpdir/codeview-debug tmpdir/codeview1.o 2>&1} /dev/null dump.out (timeout = 300)
> spawn [open ...]
>
>   objcopy: tmpdir/codeview1.o: can't dump section '.debug$S' - it does not exist: file format not recognized
>
> This was using a toolchain configured as --target=x86_64-w64-mingw32
>
> Could you look into this please ?
>
> Cheers
>   Nick
>
Hi Nick,

I don't understand this, it's working for me. This is with a target of x86_64-w64-mingw32, and the patch applied to commit 31c1130f35e0ef800ea4d92224a72872ffe4a5db.

Does your tmpdir/codeview1.o actually have a .debug$S section? I'm wondering if maybe something is choking on the dollar sign.

My versions, if it helps...

Expect version  5.45.4
Tcl version     8.6
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

Thanks

Mark



More information about the Binutils mailing list