This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] linux: Add maintenance commands to test libthread_db


On 2018-05-23 13:32, Gary Benson wrote:
Hi all,

This is an updated version of a patch I submitted for review back in
November.  It adds two new commands which may be used to test thread
debugging libraries used by GDB:

  * "maint check libthread-db" tests the thread debugging library GDB
     is using for the current inferior.

  * "maint set/show check-libthread-db" selects whether libthread_db
     tests should be run automatically as libthread_db is auto-loaded.
     The default is to not run tests automatically.

The test itself is a basic integrity check exercising all libthread_db
functions used by GDB on GNU/Linux systems.  By extension this also
exercises the proc_service functions provided by GDB that libthread_db
uses.  This is useful for NPTL developers and libthread_db developers.
It could also prove useful investigating bugs reported against GDB
where the thread debugging library or GDB's proc_service layer is
suspect.

GDB changes since version 1:
 - The check no longer requires debuginfo for glibc.  [Simon]
 - Parts of the check are skipped when working with core files.
   (I hadn't checked this until Pedro asked about them).
   Previously the check would fail because one of the tested
   operations does not work with core files on some platforms.
 - Macros starting with double underscores have been renamed.  [Pedro]
   (The macros have been somewhat reorganized too, to implement
   the core files change I mentioned above).
 - libthread_db_debug now is treated as a boolean in the place
   where previously it wasn't.  [Simon]
 - There is a NEWS entry. [Pedro]

Testcase changes since version 1:
 - Test names no longer contain parentheses.  [Simon]
 - The criteria for skipping the test have been replaced with
   Pedro's suggestion.  [Pedro]
 - Numbers in testcase comments have been removed.  [Pedro]

Built and regtested on RHEL 7.5 x86_64.

Ok to commit?

Thanks,
Gary

The patch looks good from my side.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]