From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37081 invoked by alias); 22 Oct 2015 09:59:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 37067 invoked by uid 89); 22 Oct 2015 09:59:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 22 Oct 2015 09:59:07 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 5F9A0A80 for ; Thu, 22 Oct 2015 09:59:06 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9M9x5Fr014526 for ; Thu, 22 Oct 2015 05:59:05 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/6] PR 17539 - inferiors/threads etc. print in reverse order Date: Thu, 22 Oct 2015 10:56:00 -0000 Message-Id: <1445507944-9197-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-10/txt/msg00435.txt.bz2 PR 17539 points out that "info inferiors" lists inferiors in decreasing order. I audited the "info" sub commands, and GDB is inconsistent on this issue in several places. Some commands list in ascending order, while others in descending order. For example, ascending order: (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x00000000004008ad in main at foo.c:81 2 breakpoint keep y 0x00000000004008ad in main at foo.c:81 3 breakpoint keep y 0x00000000004008ad in main at foo.c:81 4 breakpoint keep y 0x00000000004008ad in main at foo.c:81 (gdb) (gdb) info skip Num Type Enb What 1 function y main 2 function y main 3 function y main (gdb) (gdb) info bookmarks 1 0x4008ad '0' 2 0x4008ad '0' 3 0x4008ad '0' 4 0x4008ad '0' (gdb) (gdb) info tasks ID TID P-ID Pri State Name 1 8088000 0 15 Child Activation Wait main_task 2 80a4000 1 15 Accept Statement b 3 809a800 1 15 Child Activation Wait a * 4 80ae800 3 15 Runnable c (gdb) Descending: (gdb) info display Auto-display expressions now in effect: Num Enb Expression 4: y 1 3: y 1 2: y 1 1: y 1 (gdb) (gdb) info threads Id Target Id Frame 3 Thread 0x7ffff77c3700 (LWP 29035) callme () at foo.c:30 2 Thread 0x7ffff7fc4700 (LWP 29034) function (arg=0x0) at foo.c:60 * 1 Thread 0x7ffff7fc5740 (LWP 29030) main () at foo.c:92 (gdb) (gdb) info inferiors Num Description Executable 1 process 5473 /home/pedro/gdb/tests/threads * 2 process 5477 /home/pedro/gdb/tests/main (gdb) (gdb) info checkpoints 3 process 29132 at 0x4008ad, file foo.c, line 81 2 process 29131 at 0x4008ad, file foo.c, line 81 1 process 29130 at 0x4008ad, file foo.c, line 81 * 0 Thread 0x7ffff7fc5740 (LWP 29128) (main process) at 0x4008ad, file foo.c, line 81 (gdb) This patch series switches all "descending order" commands I found to ascending order, and adjusts manual and testsuite accordingly. Pedro Alves (6): Make gdb.python/py-inferior.exp test names unique Linux: dump the signalled thread first List inferiors/threads/pspaces in ascending order List checkpoints in ascending order List displays in ascending order NEWS: "info" commands now list in ascending order gdb/NEWS | 4 + gdb/doc/gdb.texinfo | 8 +- gdb/inferior.c | 13 +- gdb/linux-fork.c | 35 +++- gdb/linux-tdep.c | 126 ++++++------ gdb/printcmd.c | 14 +- gdb/progspace.c | 12 +- gdb/testsuite/gdb.base/checkpoint.exp | 4 +- gdb/testsuite/gdb.base/display.exp | 35 +++- gdb/testsuite/gdb.base/foll-exec-mode.exp | 2 +- gdb/testsuite/gdb.base/foll-fork.exp | 6 +- gdb/testsuite/gdb.base/foll-vfork.exp | 2 +- gdb/testsuite/gdb.base/multi-forks.exp | 30 +-- gdb/testsuite/gdb.base/solib-display.exp | 19 +- gdb/testsuite/gdb.mi/mi-nonstop.exp | 2 +- gdb/testsuite/gdb.mi/mi-nsintrall.exp | 4 +- gdb/testsuite/gdb.multi/base.exp | 18 +- gdb/testsuite/gdb.multi/multi-arch.exp | 2 +- gdb/testsuite/gdb.python/py-inferior.exp | 217 ++++++++++---------- gdb/testsuite/gdb.threads/break-while-running.exp | 8 +- gdb/testsuite/gdb.threads/execl.exp | 2 +- gdb/testsuite/gdb.threads/gcore-thread.exp | 4 +- gdb/testsuite/gdb.threads/info-threads-cur-sal.exp | 10 +- gdb/testsuite/gdb.threads/kill.exp | 2 +- gdb/testsuite/gdb.threads/linux-dp.exp | 2 +- gdb/testsuite/gdb.threads/multiple-step-overs.exp | 2 +- gdb/testsuite/gdb.threads/next-bp-other-thread.exp | 2 +- .../gdb.threads/step-bg-decr-pc-switch-thread.exp | 2 +- .../gdb.threads/step-over-lands-on-breakpoint.exp | 2 +- .../gdb.threads/step-over-trips-on-watchpoint.exp | 2 +- gdb/testsuite/gdb.threads/thread-find.exp | 218 ++++----------------- gdb/testsuite/gdb.threads/tls.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 13 +- gdb/thread.c | 13 +- 34 files changed, 394 insertions(+), 443 deletions(-) -- 1.9.3