This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v11] Add pretty printers for the NPTL lock types
On Thu, 2016-12-22 at 20:39 -0300, Martin Galvan wrote:
> 2016-12-22 19:50 GMT-03:00 Torvald Riegel <triegel@redhat.com>:
> > I first thought it would pick the system gdb and not the one from $PATH.
>
> What would be the difference between the "system gdb" and the one from
> $PATH? Unless you altered your $PATH to make it point to the newly
> built gdb, I don't understand what you mean.
I thought it would not pick up the gdb from PATH. But it did, and the
problem was elsewhere (see below).
> > It seems that the new gdb is used, but the test script
> > still complaints that the gdb doesn't support python ('gdb must have
> > python support to test the pretty printers.'). pexpect should be
> > installed for the python that's used. What am I doing wrong?
>
> How did you come to the conclusion that the new gdb is being used?
system gdb is too old and fails earlier tests.
> In any case, I think it would be helpful to see the value of
> gdb_python_error before the test script exits.
After *lots* of poking, it seems that something in the pexpect/gdb
combination in my case was adding terminal escape sequences to the gdb
output. That made the error string look empty when printed, but it was
not a zero-sized string and thus does not evaluate to false.
I do not know what caused this, and whether the pretty printers script
should have filtered that out or pexpect/gdb shouldn't have produced the
escape sequence in the first place. The combination I used was:
pexpect from pip on system python 2.7.5, gdb 7.8.5 built wiht
--with-python, and I had ncurses-devel-5.9-13.20130511.el7.x86_64
installed (picked up in the gdb build).
Switching to gdb 7.12 does not require ncurses or a termcap library
anymore, and works with the existing pretty printers script.
I suppose raising the minimally required gdb version would be helpful.
It would also be helpful if scripts/test_printers_common.py would not
discard the error when it cannot load the pretty printer modules for
some reason. I've changed
for printer_file in printer_files:
test('source {0}'.format(printer_file))
to the following, but don't know whether that's the proper way to do it:
for printer_file in printer_files:
test('source {0}'.format(printer_file), '')
And nptl/test-mutex-printers fails in my setup, BTW.