diff mbox

[ptx] debug info

Message ID 56E0263E.5010505@acm.org
State New
Headers show

Commit Message

Nathan Sidwell March 9, 2016, 1:33 p.m. UTC
I've committed this to trunk, to remove the squashing of debug information.  It 
  appears to function correctly.

I'd had this patch for a while, but forgot to commit it.

nathan

Comments

Alexander Monakov March 9, 2016, 2:55 p.m. UTC | #1
Hello Nathan,

On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> I've committed this to trunk, to remove the squashing of debug information.
> It appears to function correctly.
> 
> I'd had this patch for a while, but forgot to commit it.

The preceding code special-casing response to -gstabs can also be removed
after this patch.  Should I submit the (trivial) removal patch?

Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).  Would
you like me to submit patches for those?

Thanks.
Alexander
Nathan Sidwell March 9, 2016, 4:28 p.m. UTC | #2
On 03/09/16 09:55, Alexander Monakov wrote:
> Hello Nathan,
>
> On Wed, 9 Mar 2016, Nathan Sidwell wrote:
>> I've committed this to trunk, to remove the squashing of debug information.
>> It appears to function correctly.
>>
>> I'd had this patch for a while, but forgot to commit it.
>
> The preceding code special-casing response to -gstabs can also be removed
> after this patch.  Should I submit the (trivial) removal patch?

No.   I found that necessary to stop the testsuite testing stabs -- it expects 
an error, but we don't get one without that check.

> Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
> and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).  Would
> you like me to submit patches for those?

please.

nathan
Alexander Monakov March 9, 2016, 4:41 p.m. UTC | #3
On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> On 03/09/16 09:55, Alexander Monakov wrote:
> > The preceding code special-casing response to -gstabs can also be removed
> > after this patch.  Should I submit the (trivial) removal patch?
> 
> No.   I found that necessary to stop the testsuite testing stabs -- it expects
> an error, but we don't get one without that check.

Since you removed the unnecessary override, the specific check is no longer
necessary: toplevel code is capable of issuing the error for unsupported debug
info format like this:

:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gstabs
<stdin>:1:0: sorry, unimplemented: stabs debug format not supported

cc1: error: target system does not support the ‘stabs’ debug format

:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gcoff
cc1: error: target system does not support the ‘coff’ debug format

So nvptx can the generic mechanism that produces such errors for all targets
and all debug formats, rather than ad-hoc target-specific handling.

Alexander
Alexander Monakov March 10, 2016, 12:52 p.m. UTC | #4
On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> > Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
> > and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).
> > Would you like me to submit patches for those?
> 
> please.

Here's the pull request for nvptx-run.c changes:
https://github.com/MentorEmbedded/nvptx-tools/pull/11

Alexander
Nathan Sidwell March 10, 2016, 1:06 p.m. UTC | #5
On 03/09/16 11:41, Alexander Monakov wrote:

> :|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gstabs
> <stdin>:1:0: sorry, unimplemented: stabs debug format not supported
>
> cc1: error: target system does not support the ‘stabs’ debug format
>
> :|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gcoff
> cc1: error: target system does not support the ‘coff’ debug format
>
> So nvptx can the generic mechanism that produces such errors for all targets
> and all debug formats, rather than ad-hoc target-specific handling.

Hm, something must have changed since  I found that sorry neccessary.

nathan
Nathan Sidwell March 10, 2016, 1:11 p.m. UTC | #6
On 03/10/16 07:52, Alexander Monakov wrote:
> On Wed, 9 Mar 2016, Nathan Sidwell wrote:
>>> Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
>>> and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).
>>> Would you like me to submit patches for those?
>>
>> please.
>
> Here's the pull request for nvptx-run.c changes:
> https://github.com/MentorEmbedded/nvptx-tools/pull/11

merged, thanks
Alexander Monakov March 10, 2016, 1:14 p.m. UTC | #7
On Thu, 10 Mar 2016, Nathan Sidwell wrote:
> Hm, something must have changed since  I found that sorry neccessary.

As I already said in my opening sentence (not quoted in your response), you
removed the unnecessary override.  This is exactly what lets toplevel code see
requested debug format now, and react accordingly.

Alexander
diff mbox

Patch

2016-03-09  Nathan Sidwell  <nathan@acm.org>

	* config/nvptx/nvptx.c (nvptx_option_override): Don't kill debug level.

Index: config/nvptx/nvptx.c
===================================================================
--- config/nvptx/nvptx.c	(revision 234081)
+++ config/nvptx/nvptx.c	(working copy)
@@ -164,11 +164,6 @@  nvptx_option_override (void)
     /* The stabs testcases want to know stabs isn't supported.  */
     sorry ("stabs debug format not supported");
 
-  /* Actually we don't have any debug format, but don't be
-     unneccesarily noisy.  */
-  write_symbols = NO_DEBUG;
-  debug_info_level = DINFO_LEVEL_NONE;
-
   if (nvptx_optimize < 0)
     nvptx_optimize = optimize > 0;