Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread David Malcolm
On Tue, 2023-11-07 at 16:57 +0100, Clément Chigot wrote: > > > However, I'm not sure how you're planning to make the transition. > > > But > > > currently, it looks like libdiagnostics is either enabled and > > > thus > > > the > > > new format being produced, either it's not and we do have the > >

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread Clément Chigot
> > However, I'm not sure how you're planning to make the transition. But > > currently, it looks like libdiagnostics is either enabled and thus > > the > > new format being produced, either it's not and we do have the legacy > > format. I think the transition should be smoother than that, there >

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread Jan Beulich
On 07.11.2023 15:32, David Malcolm wrote: > On Tue, 2023-11-07 at 11:03 +0100, Jan Beulich wrote: >> On 06.11.2023 23:29, David Malcolm wrote: >>> All of the locations are just lines; does gas do column numbers at >>> all? >>> (or ranges?) >> >> It currently doesn't, which is primarily related to t

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread David Malcolm
On Tue, 2023-11-07 at 08:04 +0100, Simon Sobisch wrote: > Thank you very much for this proof-of-concept use! > > Inspecting it raises the following questions to me, both for a > possible > binutils implementation and for the library use in general: > > * How should the application set the releva

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread David Malcolm
On Tue, 2023-11-07 at 11:03 +0100, Jan Beulich wrote: > On 06.11.2023 23:29, David Malcolm wrote: > > Here's a patch for gas in binutils that makes it use libdiagnostics > > (with some nasty hardcoded paths to specific places on my hard > > drive > > to make it easier to develop the API). > > > >

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread David Malcolm
On Tue, 2023-11-07 at 10:21 +0100, Clément Chigot wrote: > Hi David, > > Thanks for that interesting RFC ! I'm fully in favor of such > improvements, having uniformed error messages across gcc, gas and > later ld, would greatly help integration of these tools, let alone > the > SARIF format output

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread Jan Beulich
On 06.11.2023 23:29, David Malcolm wrote: > Here's a patch for gas in binutils that makes it use libdiagnostics > (with some nasty hardcoded paths to specific places on my hard drive > to make it easier to develop the API). > > For now this hardcodes adding two sinks: a text sink on stderr, and >

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-07 Thread Clément Chigot
Hi David, Thanks for that interesting RFC ! I'm fully in favor of such improvements, having uniformed error messages across gcc, gas and later ld, would greatly help integration of these tools, let alone the SARIF format output. However, I'm not sure how you're planning to make the transition. But

Re: [PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-06 Thread Simon Sobisch
Thank you very much for this proof-of-concept use! Inspecting it raises the following questions to me, both for a possible binutils implementation and for the library use in general: * How should the application set the relevant context (often lines are shown before/after)? * Should it be po

[PATCH] binutils: experimental use of libdiagnostics in gas

2023-11-06 Thread David Malcolm
Here's a patch for gas in binutils that makes it use libdiagnostics (with some nasty hardcoded paths to specific places on my hard drive to make it easier to develop the API). For now this hardcodes adding two sinks: a text sink on stderr, and also a SARIF output to stderr (which happens after all