[pypy-commit] pypy default: Keep the end-of-line characters, otherwise it's all printed on

arigo noreply at buildbot.pypy.org
Mon Oct 31 17:24:48 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r48621:7d298f1a3bf6
Date: 2011-10-31 17:24 +0100
http://bitbucket.org/pypy/pypy/changeset/7d298f1a3bf6/

Log:	Keep the end-of-line characters, otherwise it's all printed on one
	line. Fixes c041e29173a9. Restore a comment that was lost from
	that checkin, too.

diff --git a/pypy/jit/backend/x86/tool/viewcode.py b/pypy/jit/backend/x86/tool/viewcode.py
--- a/pypy/jit/backend/x86/tool/viewcode.py
+++ b/pypy/jit/backend/x86/tool/viewcode.py
@@ -58,7 +58,7 @@
     assert not p.returncode, ('Encountered an error running objdump: %s' %
                               stderr)
     # drop some objdump cruft
-    lines = stdout.splitlines()[6:]
+    lines = stdout.splitlines(True)[6:]     # drop some objdump cruft
     return format_code_dump_with_labels(originaddr, lines, label_list)
 
 def format_code_dump_with_labels(originaddr, lines, label_list):
@@ -97,7 +97,7 @@
     stdout, stderr = p.communicate()
     assert not p.returncode, ('Encountered an error running nm: %s' %
                               stderr)
-    for line in stdout.splitlines():
+    for line in stdout.splitlines(True):
         match = re_symbolentry.match(line)
         if match:
             addr = long(match.group(1), 16)


More information about the pypy-commit mailing list