diff mbox

[v11] Add pretty printers for the NPTL lock types

Message ID 1483367714-28081-1-git-send-email-omgalvan.86@gmail.com
State New
Headers show

Commit Message

Martin Galvan Jan. 2, 2017, 2:35 p.m. UTC
2017-01-02 10:51 GMT-03:00 Joseph Myers <joseph@codesourcery.com>:
> I'm seeing the following failures with current sources on x86_64.  This is
> with system GDB on Ubuntu 16.04 (but a locally built compiler, configured
> as a cross compiler, for building glibc).

Yes, I'm seeing those too. They seem to be caused by a tabs/spaces mismatch introduced in commit ed19993b5b0d05d62cc883571519a67dae481a14.
The following patch should fix it:

ChangeLog:

2017-01-02  Martin Galvan  <martingalvan@sourceware.org>

	* nptl/nptl-printers.py: Fix tabs/spaces mismatches.

---
 nptl/nptl-printers.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--
2.7.4

Comments

Torvald Riegel Jan. 2, 2017, 3:47 p.m. UTC | #1
On Mon, 2017-01-02 at 11:35 -0300, Martin Galvan wrote:
> 2017-01-02 10:51 GMT-03:00 Joseph Myers <joseph@codesourcery.com>:
> > I'm seeing the following failures with current sources on x86_64.  This is
> > with system GDB on Ubuntu 16.04 (but a locally built compiler, configured
> > as a cross compiler, for building glibc).
> 
> Yes, I'm seeing those too. They seem to be caused by a tabs/spaces mismatch introduced in commit ed19993b5b0d05d62cc883571519a67dae481a14.

Oops, my fault.  I'd like to claim that this was just to show that it
would be helpful for the script to say why a pretty printer could not be
enabled ;) -- but it's just that I fixed whitespace the wrong way around
for python when the git commit hooks complained that I had mixed tabs
and spaces in those lines...
Joseph Myers Jan. 2, 2017, 9:50 p.m. UTC | #2
On Mon, 2 Jan 2017, Martin Galvan wrote:

> 2017-01-02 10:51 GMT-03:00 Joseph Myers <joseph@codesourcery.com>:
> > I'm seeing the following failures with current sources on x86_64.  This is
> > with system GDB on Ubuntu 16.04 (but a locally built compiler, configured
> > as a cross compiler, for building glibc).
> 
> Yes, I'm seeing those too. They seem to be caused by a tabs/spaces mismatch introduced in commit ed19993b5b0d05d62cc883571519a67dae481a14.
> The following patch should fix it:
> 
> ChangeLog:
> 
> 2017-01-02  Martin Galvan  <martingalvan@sourceware.org>
> 
> 	* nptl/nptl-printers.py: Fix tabs/spaces mismatches.

Thanks, please commit this patch as obvious.
Siddhesh Poyarekar Jan. 3, 2017, 7:26 a.m. UTC | #3
On Tuesday 03 January 2017 03:20 AM, Joseph Myers wrote:
>> 2017-01-02  Martin Galvan  <martingalvan@sourceware.org>
>>
>> 	* nptl/nptl-printers.py: Fix tabs/spaces mismatches.
> 
> Thanks, please commit this patch as obvious.

Pushed.

Siddhesh
diff mbox

Patch

diff --git a/nptl/nptl-printers.py b/nptl/nptl-printers.py
index 17463c4..77018e7 100644
--- a/nptl/nptl-printers.py
+++ b/nptl/nptl-printers.py
@@ -348,10 +348,10 @@  class ConditionVariablePrinter(object):
     def read_attributes(self):
         """Read the condvar's attributes."""

-	if (self.wrefs & PTHREAD_COND_CLOCK_MONOTONIC_MASK) != 0:
-		self.values.append(('Clock ID', 'CLOCK_MONOTONIC'))
-	else:
-		self.values.append(('Clock ID', 'CLOCK_REALTIME'))
+        if (self.wrefs & PTHREAD_COND_CLOCK_MONOTONIC_MASK) != 0:
+            self.values.append(('Clock ID', 'CLOCK_MONOTONIC'))
+        else:
+            self.values.append(('Clock ID', 'CLOCK_REALTIME'))

         if (self.wrefs & PTHREAD_COND_SHARED_MASK) != 0:
             self.values.append(('Shared', 'Yes'))
@@ -409,10 +409,10 @@  class ConditionVariableAttributesPrinter(object):

         clock_id = (self.condattr >> 1) & ((1 << COND_CLOCK_BITS) - 1)

-	if clock_id != 0:
-		self.values.append(('Clock ID', 'CLOCK_MONOTONIC'))
-	else:
-		self.values.append(('Clock ID', 'CLOCK_REALTIME'))
+        if clock_id != 0:
+            self.values.append(('Clock ID', 'CLOCK_MONOTONIC'))
+        else:
+            self.values.append(('Clock ID', 'CLOCK_REALTIME'))

         if self.condattr & 1:
             self.values.append(('Shared', 'Yes'))