Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread Mark Wielaard
H.J. Lu wrote: > On Sat, Aug 29, 2020 at 9:33 AM Mark Wielaard wrote: >> Hi, >> >> On Sat, Aug 29, 2020 at 08:43:30AM -0700, H.J. Lu wrote: >>> On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard wrote: My proposal, and what my strawman patch implements, is that gas will generate a .debug_

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread H.J. Lu via Gcc-patches
On Sat, Aug 29, 2020 at 9:33 AM Mark Wielaard wrote: > > Hi, > > On Sat, Aug 29, 2020 at 08:43:30AM -0700, H.J. Lu wrote: > > On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard wrote: > > > My proposal, and what my strawman patch implements, is that gas will > > > generate a .debug_line section when -

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread Mark Wielaard
Hi, On Sat, Aug 29, 2020 at 08:43:30AM -0700, H.J. Lu wrote: > On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard wrote: > > My proposal, and what my strawman patch implements, is that gas will > > generate a .debug_line section when -g is given and the debug types is > > DWARF (just as it does now).

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread H.J. Lu via Gcc-patches
On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard wrote: > > Hi, > > On Sat, Aug 29, 2020 at 07:34:35AM -0700, H.J. Lu wrote: > > On Sat, Aug 29, 2020 at 5:24 AM Mark Wielaard wrote: > > > On Wed, Aug 26, 2020 at 04:38:21PM -0700, H.J. Lu wrote: > > > > On Wed, Aug 26, 2020 at 2:38 PM Mark Wielaard

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread Mark Wielaard
Hi, On Sat, Aug 29, 2020 at 07:34:35AM -0700, H.J. Lu wrote: > On Sat, Aug 29, 2020 at 5:24 AM Mark Wielaard wrote: > > On Wed, Aug 26, 2020 at 04:38:21PM -0700, H.J. Lu wrote: > > > On Wed, Aug 26, 2020 at 2:38 PM Mark Wielaard wrote: > > > > Would it be possible to have something like the foll

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread H.J. Lu via Gcc-patches
On Sat, Aug 29, 2020 at 5:24 AM Mark Wielaard wrote: > > Hi, > > On Wed, Aug 26, 2020 at 04:38:21PM -0700, H.J. Lu wrote: > > On Wed, Aug 26, 2020 at 2:38 PM Mark Wielaard wrote: > > > Would it be possible to have something like the following in gas, so > > > that it doesn't try generating a .deb

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-29 Thread Mark Wielaard
Hi, On Wed, Aug 26, 2020 at 04:38:21PM -0700, H.J. Lu wrote: > On Wed, Aug 26, 2020 at 2:38 PM Mark Wielaard wrote: > > Would it be possible to have something like the following in gas, so > > that it doesn't try generating a .debug_line section if there already > > is one, even when -gdwarf-N is

Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-26 Thread H.J. Lu via Gcc-patches
On Wed, Aug 26, 2020 at 2:38 PM Mark Wielaard wrote: > > Hi gcc hackers, binutils hackers, > > Nick, Jakub and I were discussing the gcc patch below and all the ways > it is wrong. Most things can be fixed in the spec. Like only passing > -gdwarf if we are generating DWARF and passing the right DW

Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)

2020-08-26 Thread Mark Wielaard
Hi gcc hackers, binutils hackers, Nick, Jakub and I were discussing the gcc patch below and all the ways it is wrong. Most things can be fixed in the spec. Like only passing -gdwarf if we are generating DWARF and passing the right DWARF version as -gdwarf-N for the version that gcc itself creates.

[PATCH 5/5] Add --gdwarf-5 to ASM_SPEC

2020-08-24 Thread Mark Wielaard
This is needed to get DWARF version 5 .debug_line tables. It is also obviously wrong. It needs a check for whether as supports --gdwarf- for all versions we support and it should only be added when generating DWARF debug information for the specific DWARF version we are generating. It also needs s