Re: syms_from_objfile() warnings and win32-nat.c IO redirection (Was: suppress annoying warnings about cygwin1.dbg)

Christopher Faylor
2007-10-30T01:27:42Z

On Mon, Oct 29, 2007 at 10:53:20PM +0000, Pedro Alves wrote:
> I'm a bit puzzled, since I've just found out that:
>
> strip --strip-debug ${dest} -o ${stripped_file}
> strip --only-keep-debug main.exe -o ${debug_file}
> objcopy --add-gnu-debuglink=${debug_file} ${stripped_file} ${dest}
>
> ... currently plays nicelly in PE/coff + stabs+. The
> CONTENTS | ALLOC sections simply get
> the CONTENTS dropped, thus it seems that gdb
> doesn't need any fixing after all.
>
>> objdump.exe -h main.exe
>
> main.exe: file format pei-i386
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 000003a0 00401000 00401000 00000400 2**4
> CONTENTS, ALLOC, LOAD, READONLY, CODE
> 1 .data 00100000 00402000 00402000 00000800 2**4
> CONTENTS, ALLOC, LOAD, DATA
> 2 .bss 00000040 00502000 00502000 00000000 2**4
> ALLOC
> 3 .idata 00000170 00503000 00503000 00100800 2**2
> CONTENTS, ALLOC, LOAD, DATA
> 4 .gnu_debuglink 00000014 00504000 00504000 00100a00 2**2
> CONTENTS, READONLY, DEBUGGING
>
>> objdump.exe -h main.exe.dbg
>
> main.exe.dbg: file format pei-i386
>
> Sections:
> Idx Name Size VMA LMA File off Algn
> 0 .text 000003a0 00401000 00401000 00000000 2**4
> ALLOC, LOAD, READONLY, CODE
> 1 .data 00100000 00402000 00402000 00000000 2**4
> ALLOC, LOAD, DATA
> 2 .bss 00000040 00502000 00502000 00000000 2**4
> ALLOC
> 3 .idata 00000170 00503000 00503000 00000000 2**2
> ALLOC, LOAD, DATA
> 4 .stab 0000c630 00504000 00504000 00000268 2**2
> CONTENTS, READONLY, DEBUGGING, EXCLUDE
> 5 .stabstr 0004e99f 00511000 00511000 0000ca68 2**0
> CONTENTS, READONLY, DEBUGGING, EXCLUDE
>
>
> Chris, Brian, would it be possible to instead fix the
> cygwin1.dbg generation to do something similar to
> the above recipe?

No need to ask anyone. Just make the changes you're proposing and see
if they work.

cgf