diff mbox series

Fix gdbhooks.py

Message ID 20170901203605.GT2323@tucnak
State New
Headers show
Series Fix gdbhooks.py | expand

Commit Message

Jakub Jelinek Sept. 1, 2017, 8:36 p.m. UTC
Hi!

I'm seeing on the trunk errors like:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "../../gcc/gdbhooks.py", line 441
    if name == 'E_VOIDmode':
                           ^
TabError: inconsistent use of tabs and spaces in indentation
.gdbinit:14: Error in sourced command file:
Error while executing Python code.

(with gdb 7.12.1).

The following patch fixes that, bootstrapped/regtested on x86_64-linux and
i686-linux, ok for trunk?

2017-09-01  Jakub Jelinek  <jakub@redhat.com>

	* gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
	instead of tab.



	Jakub

Comments

Richard Biener Sept. 2, 2017, 12:37 p.m. UTC | #1
On September 1, 2017 10:36:05 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
>Hi!
>
>I'm seeing on the trunk errors like:
>Traceback (most recent call last):
>  File "<string>", line 1, in <module>
>  File "../../gcc/gdbhooks.py", line 441
>    if name == 'E_VOIDmode':
>                           ^
>TabError: inconsistent use of tabs and spaces in indentation
>.gdbinit:14: Error in sourced command file:
>Error while executing Python code.
>
>(with gdb 7.12.1).
>
>The following patch fixes that, bootstrapped/regtested on x86_64-linux
>and
>i686-linux, ok for trunk?

OK. 

Richard. 

>2017-09-01  Jakub Jelinek  <jakub@redhat.com>
>
>	* gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
>	instead of tab.
>
>--- gcc/gdbhooks.py.jj	2017-09-01 09:26:27.000000000 +0200
>+++ gcc/gdbhooks.py	2017-09-01 20:04:04.135133016 +0200
>@@ -438,8 +438,8 @@ class OptMachineModePrinter:
> 
>     def to_string (self):
>         name = str(self.gdbval['m_mode'])
>-	if name == 'E_VOIDmode':
>-	    return '<None>'
>+        if name == 'E_VOIDmode':
>+            return '<None>'
>         return name[2:] if name.startswith('E_') else name
> 
> ######################################################################
>
>
>	Jakub
diff mbox series

Patch

--- gcc/gdbhooks.py.jj	2017-09-01 09:26:27.000000000 +0200
+++ gcc/gdbhooks.py	2017-09-01 20:04:04.135133016 +0200
@@ -438,8 +438,8 @@  class OptMachineModePrinter:
 
     def to_string (self):
         name = str(self.gdbval['m_mode'])
-	if name == 'E_VOIDmode':
-	    return '<None>'
+        if name == 'E_VOIDmode':
+            return '<None>'
         return name[2:] if name.startswith('E_') else name
 
 ######################################################################