Message ID | 20170106151610.28872-1-simon.marchi@ericsson.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 49382 invoked by alias); 6 Jan 2017 15:16:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 49169 invoked by uid 89); 6 Jan 2017 15:16:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 spammy=HX-AuditID:sk:c1b4fb3, Hx-languages-length:1553, states X-HELO: sesbmg22.ericsson.net Received: from sesbmg22.ericsson.net (HELO sesbmg22.ericsson.net) (193.180.251.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 15:16:27 +0000 Received: from ESESSHC011.ericsson.se (Unknown_Domain [153.88.183.51]) by (Symantec Mail Security) with SMTP id B7.CA.31458.8C4BF685; Fri, 6 Jan 2017 16:16:25 +0100 (CET) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.51) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Jan 2017 16:16:24 +0100 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxcz23q12-y4.ca.am.ericsson.se (192.75.88.130) by DBXPR07MB398.eurprd07.prod.outlook.com (10.141.14.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.4; Fri, 6 Jan 2017 15:16:21 +0000 From: Simon Marchi <simon.marchi@ericsson.com> To: <gdb-patches@sourceware.org> CC: Simon Marchi <simon.marchi@ericsson.com> Subject: [PATCH] Update help of the "frame" command Date: Fri, 6 Jan 2017 10:16:10 -0500 Message-ID: <20170106151610.28872-1-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: BN6PR03CA0053.namprd03.prod.outlook.com (10.173.137.15) To DBXPR07MB398.eurprd07.prod.outlook.com (10.141.14.148) X-MS-Office365-Filtering-Correlation-Id: 4fb6088c-6191-496c-6fb8-08d43646f951 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DBXPR07MB398; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB398; 3:kPMHL+324ddipQ2bb3qIg97U2CvVTA6OR6bjJSvwt6F6x6dsD0H4K9vLbOsspz+k9maz1yvfrp1TC0hy1IuEHwvwwhsjfj7dtqcKm69E/gupfEgkxE19iJLgZkJdHeuos+QQrYfuj3qdtEUIe5cQa2CDhRyykhRsvpYI2Uhpoh0k0YYHcWOAK7pBb4ryTJr0VFFg+91880B7aC+RZ/+4xCNrYYajeV2NeuaHzMZSLMP3gDGo1hmhxJOkl+wQTbZ9GIIgV8g9C9cbO4hGzIA+8w==; 25:YWkln9bJIodeE06ESvZeXZxJa56zRZ6+EU0GuQReMoj4W0bY7qdeMrSVZ6YwVgA8HejhaMKu9hQom59KCxBItJHwtqi9iMAwI643hF4IzFmvKQBYQh9/IeQxnSPq2+ryTQpFh7pnHx6YuGhikFJ8AUiqUEi2Z58NbHJ0RbJCOGYtBh41AX7pM7fbGCE3g4lXkiUA80m2GJ6ruhSofgxeZ27SJu1k8Qkvn1hRldXojUDbmqD2P8KLug/x7TlZk5F+sqlnyKkxSSK0TTLDeoV9QH6+mnkkrXPJavVoTI+Z39/o1xv5Ko4tfPTDeT9SVOwPjnFiCDMXeLsRZOslkFAoKJAT11Lu3j8G1uZv0jz6axDOyx9nDnzWKu6kUHdB6izFR43p4/2yPl5Ej+08Dob3a8rM5w17f6XtAz/qx1cYEKtW5TQ29b+xJXhxbuttgjSU+hzoRq3ZSmu5Xlef5xPTOg== X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB398; 31:gPGTRBfnxuOXRdUXdx2E7a1GXk4OVpHjT17KdetWIsWZD4RggoZEWVz+K9jUvjLylx1GlEmt8c+bQRbL2XNgOS349c5rpfw2JmK4Ywp/6J04sh6s/Bpo/H0XtmzIEPiFEyCWtxx7ct/0enyE3kSWLDSgvzWg61PZdgXxcTEtpm9n/E4Hh1XZeOqWBj5qwN91gIew52gy6T5oH07DFLpzVKad7d7HR4YYpWxf7lgx33Uzo/4Ox7jb8HgRqxVgCXXGjj44yQYEl52QmhPVjUrl/A==; 20:IofvSAX2JGXqRS0xmmhuEjZsfUHCQaRfZKZKQ/xnRDIagDuV1enx3R6pWKRqsC/1fnpw8d5/HF8ELRwOMxm7mFdKZyZUn0x5b7crShBLtmpaWyZgTUf4hK+SmQhSfHUbvjANziGAfWFU7EaPy/yFUyH2xirDhCn3wJmh45grsJ+5qJAUQSbbwja0pVLb1cQ1BVPx2pnBJqegq05gu53n9LJi+w0QTNzf8FCKzSIGFKbjiR3EcDdwonsK/hbqBk4fB3L2Ca2yKZaILxzRpnZuPhhPixtRX2n5zL2s0uctY/jX+fE7+a13dh+w1wL3TCFZGIr8sG3FFr5oYv9prmTA8puTLygC9HZKCdZ4kh9t7w/mRrYulVY/kf+f1l3AXxNWqURpygC9+kLFernrgG50Xut0aL9wrT2OdBZ+LqGaxaxOelYC1R+krQR4aVeOHZT9kR3XuCeEpVy3+bZAlc8PodaXcraASAGipDWCNBVX4kZEkzoAGgtwfdGDI+ATReAl X-Microsoft-Antispam-PRVS: <DBXPR07MB398F8D0A60B87B8B62267FAED630@DBXPR07MB398.eurprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148); SRVR:DBXPR07MB398; BCL:0; PCL:0; RULEID:; SRVR:DBXPR07MB398; X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB398; 4:yc3UrgRd6+S5APDo9P/km10dWXD5Cwk/yWiKf7oBZFOlafDehoETkZFbRqDiyqjRbX1X9lhml6ijlseKg604vCMPGAJvCk/m34HqpIWE3cF0S8VBqErDbxUE02QfTMbkaBGStbIXIHjKcWIvoSixUXwUQveXKee6Ak7wsryNyIkf0ABV02yvhBuTdGqSRH9XCXyFaQUUrirbqXWN/76g9Y9rxipgU8XwZx69mirFSTcv3yo2FQ033KGGxNJw4t90/Io+xNmiQC+0wmgae3QrFV6tFHOnDrsEcZ8JQgOGtFrLjq4RqgyJYc8HQfvu6W9bBPk1GKwV5aAAYfhwB0DrVTNo9G23/nO6XK0wbrqhIFWfuilwU+j4/DShotEaQhB9BBTXs3NYm3FluzwH3XTE9uDw3LL7iui4WQ0YLEfuJHaIV2TSlS6tlLkSK4RRxAnUG2iZ8hBicCa9Q2SRUfBUZukAFUsr9wfZnjU5PiuxS7ytjSNuU16lm+UOfKLefoAs8kcvv4TU0H2xPg3tUjenBwCr6OATKfl52ZLNye0PMxmSfSk1v7KzBGYdMrhRGSGIu5cWHirdxnD+u0MqVJm7Jw== X-Forefront-PRVS: 01792087B6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(54534003)(189002)(199003)(7736002)(50226002)(4326007)(81166006)(1076002)(3846002)(6116002)(50986999)(2906002)(68736007)(81156014)(5660300001)(6666003)(101416001)(6916009)(8676002)(42186005)(47776003)(48376002)(50466002)(66066001)(2351001)(15650500001)(105586002)(4001430100002)(33646002)(36756003)(110136003)(92566002)(5003940100001)(106356001)(6486002)(6506006)(305945005)(38730400001)(6512006)(25786008)(450100001)(107886002)(189998001)(575784001)(97736004)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DBXPR07MB398; H:elxcz23q12-y4.ca.am.ericsson.se; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DBXPR07MB398; 23:0cCeIV8x4Lub2kv489MsZ7AwbVgGpr+T5UzI8ZBys8?= =?us-ascii?Q?hVxWuiikc3/jgktkoTUF4vPsnFSsTSWZXsbX6TGTn7AbSQk50Ii0lpvwQIn4?= =?us-ascii?Q?nUalePaCdEWtYDiy7r6zQuGSopSyYAu0gJQtoZl/KJTBuhAqsRJXXe9RbTvf?= =?us-ascii?Q?Yf7flQF4ApcaWLl0O4RChOJ68qfmMRUhI4JJKVfgBdex7Ea7zqnug/Aw0svE?= =?us-ascii?Q?ABOu7ozHfN8D1BNk9JygDes41SxJaR8WKmjSxSsrN39dqlNADHCNfVCQQE/k?= =?us-ascii?Q?Y75aE84o1X9UoBFSsdUEWp41RoLF/stn3yvfqabGYvoFOMbxA8y5dYv/VR2V?= =?us-ascii?Q?0f/OXzOW53Z89Lj2gTeBUoo6S4v+36HthB9J2lkj2IXDbJXaVv3KSUkKRkIz?= =?us-ascii?Q?GiBt7ZCmvHjxXgOf9pkQZXWwVBjNiJ2fvhAO+xgopz478fnuBka8dJKNNuGk?= =?us-ascii?Q?arkwQf0DZeTWjINQw2PTgCyVXv15Mq2om6fS5LI1FIszA/6oF9N6VxxOcyl6?= =?us-ascii?Q?j9uBgmBStjkQj1GkI3pN6Teh1nEwgXl1QpJno4KykEKLWc+B0jmu3Tan34SM?= =?us-ascii?Q?K+WzmnEOLPdPws0XdhNRz+M9FI4Z83ISOLSYsh5fuufjgf4XdEUlzmVtUtqa?= =?us-ascii?Q?Urf4o7wMVmxbDhuwf8cJkzu8/0Iy/cQVuZ9SGYBhQbWE10QWYeRC5IdjkYGk?= =?us-ascii?Q?dakElzFSZ3rAZd945V4TNJHUMVzuqwbl4iX9van4s7rYnTZJv2f2blt7U0Bj?= =?us-ascii?Q?FMIvAQoHteENdL8Q/8aqFwEHiYBZihu5Tt3WIYSn4e/8ghWHNjGzxvaHexav?= =?us-ascii?Q?0pfO8RsmZm8+IC9aCLMZYEVC7CXTY8Neg5y9UpMFADNlxvErqRlIlCVMbe+c?= =?us-ascii?Q?FdE/ltI27GNC3s+aZRtb5i3keglMROu+eTJf6bnuZr14rCui9OFdVjyY6AEJ?= =?us-ascii?Q?ArdPAJnTeow8AuXr0usiACC1+gL3ycVMZm4u2WxYMDRq5ALemsMe5s5Ogi0O?= =?us-ascii?Q?cC1TJcX8NB9N2wvCid4OI8k+4QKnUKVOdoQfAqGTlz6dnvDc/h6aq6WPGydP?= =?us-ascii?Q?LJxqvqiE9FyCMdYqviz/zK7JcYYWufzuAnkn0DX+Q5yCOz3m5OYFyo+7cnQ8?= =?us-ascii?Q?s4FFSO3ieDSN7hHhlLr1kcarG1NxFemX4fRXMjS1PV/Mhr6yzYBXpRi9hwc6?= =?us-ascii?Q?X9xF7VsO2YJVGy+98XE2Uh4oEXZ0Wr8BGyDcXXF+0F9AiTMZ0KUABgFA=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB398; 6:cVUGnhaF82GZwRYHzNWn9kUSw+HVCddZ42TyCKrqcSpjdPTIoJ2ghQOVWzvrVkwsWddvpIZNmivbUOfIbxqQWag0X1UyKgUwcyjkDxShlSb7U2ZmQnR/uqQcUIM3PkfpiPqou5vlrr+2+3+0BFqxjOK/bg6WyfFB0spErU34QeXXJ1CZmacAGRt+Fgf3xXsLXGR2ENJl6toxgkIlRADts5zplNNMTG+UqnJDgn/TchjeCH66JFrG0KMEtOs0++IQzgiixetDpglE3MJBPAZDBWFeGk7jhhg/4Q1sIC3chtKM/aeBr2YxL4mGuj1jvh9Cq5pOV40sG0Y6AzbuD52TxscvDwIPFhgEYhktTp/ugMa2NAJpLZD0vTNkNmr4PD1z/zkmpdfqRRTkfPzhLLVwh8aKR4WIkhNdL/dA0aYyogg=; 5:eDu063Waf7XjcCvs8mOo2/FTbKdIWmrC+iOkbfSN3q92Efb1yRbuHtFCgG3DwtSjDTdScdL6q1vvTtI1Q2gA0T4k7Tz4UY9rjj14D/r8zlcXB2M3ZhlmfkOBrjQY7wZmhv9Z+dLvKIVeKdTEO6nK41M3yCzGrSe8CO7MS/T8fBQ=; 24:4YoJfCdyFPxF7IkiNdrYPX8ytTe1sznNN0CIHSRVwJpkoKFNfyTBSRdZDDbk3+6Yk1/zQvtBXyOFZpqOB0NazlKHe30v1Nq559HaLR1Y1hc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DBXPR07MB398; 7:PHYq/J/pGdPiG5f7qWDaQc1sTqkIydNFsOfIis2dU18Q/RjeSkGwgWQcYBqlGrvwqukNvJ66T/hwTFoDGt4NQN+56q9Qn7kvHjrrRaNf9Tinm8wgAzQYf/qraLG6cZMoQE0M8SUfHIGdZJbZ+5N5QdeR0BPSDE+zs3wE6SnQbYvut6RcktBe9vc87Hkv6E0d7YxdkGJyKTYuspTL2+F9OfJKLPpilfYH3AO6t+jIk8kFw4obKVvsqFMs1XUfQmWqMjWZ+anMI2e2yenMWDIn/PFlv8DRKMI/oxr/yDqsR3CcqO34NLWn8fiGXHmZNjFBptVs+TaddybN4gT4hJmYcAJEgrXJ4pgdcpwyCviaHxfzc8uiEVfPAEyKEdABomnqAkbXp3pAShzUXorbQvou9jF4b/RABQ7O1MxabkhX8Qn/axti9Uhe4dy+xZZamRmnxXCbQIVB2SHb05bKlW489g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2017 15:16:21.9943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB398 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes |
Commit Message
Simon Marchi
Jan. 6, 2017, 3:16 p.m. UTC
The help message of the "frame" command states that nothing is printed if the command is executed from the command file or user-defined command. My testing leads me to think that this is not true (at least today). (gdb) bt #0 bar (n=17) at test.c:9 #1 0x00000000004006e0 in foo (v=17) at test.c:13 #2 0x00000000004006f0 in main () at test.c:21 (gdb) frame #0 bar (n=17) at test.c:9 9 baz(n); (gdb) define foo Type commands for definition of "foo". End with a line saying just "end". >frame 1 >end (gdb) foo #1 0x00000000004006e0 in foo (v=17) at test.c:13 13 bar(v); This patch simply removes that bit from the help message. I didn't find anything corresponding to this in the documentation that needs to be fixed. gdb/ChangeLog: * stack.c (_initialize_stack): Update "frame" command help message. --- gdb/stack.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On 01/06/2017 09:16 AM, Simon Marchi wrote: > The help message of the "frame" command states that nothing is printed > if the command is executed from the command file or user-defined > command. My testing leads me to think that this is not true (at least > today). > > (gdb) bt > #0 bar (n=17) at test.c:9 > #1 0x00000000004006e0 in foo (v=17) at test.c:13 > #2 0x00000000004006f0 in main () at test.c:21 > (gdb) frame > #0 bar (n=17) at test.c:9 > 9 baz(n); > (gdb) define foo > Type commands for definition of "foo". > End with a line saying just "end". > >frame 1 > >end > (gdb) foo > #1 0x00000000004006e0 in foo (v=17) at test.c:13 > 13 bar(v); > > This patch simply removes that bit from the help message. I didn't find > anything corresponding to this in the documentation that needs to be > fixed. > > gdb/ChangeLog: > > * stack.c (_initialize_stack): Update "frame" command help message. > --- > gdb/stack.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/gdb/stack.c b/gdb/stack.c > index 64224d0aad..201a358833 100644 > --- a/gdb/stack.c > +++ b/gdb/stack.c > @@ -2666,9 +2666,7 @@ This is useful in command scripts.")); > Select and print a stack frame.\nWith no argument, \ > print the selected stack frame. (See also \"info frame\").\n\ > An argument specifies the frame to select.\n\ > -It can be a stack frame number or the address of the frame.\n\ > -With argument, nothing is printed if input is coming from\n\ > -a command file or a user-defined command.")); > +It can be a stack frame number or the address of the frame.\n")); > > add_com_alias ("f", "frame", class_stack, 1); > > Sounds reasonable to me. I ran into other help text block inconsistencies. It looks like there is potential for more corrections in that area.
On 2017-01-06 11:25, Luis Machado wrote: > Sounds reasonable to me. I ran into other help text block > inconsistencies. It looks like there is potential for more corrections > in that area. If you want to point them out, I can take a look and try to make patches.
On 01/06/2017 10:28 AM, Simon Marchi wrote: > On 2017-01-06 11:25, Luis Machado wrote: >> Sounds reasonable to me. I ran into other help text block >> inconsistencies. It looks like there is potential for more corrections >> in that area. > > If you want to point them out, I can take a look and try to make patches. I'm about to send an improvement to the "load" command, but basically i noticed we are lacking proper usage information in some commands. I don't have a list off the top of my head though.
On 17-01-06 10:16:10, Simon Marchi wrote: > @@ -2666,9 +2666,7 @@ This is useful in command scripts.")); > Select and print a stack frame.\nWith no argument, \ > print the selected stack frame. (See also \"info frame\").\n\ > An argument specifies the frame to select.\n\ > -It can be a stack frame number or the address of the frame.\n\ > -With argument, nothing is printed if input is coming from\n\ > -a command file or a user-defined command.")); > +It can be a stack frame number or the address of the frame.\n")); > These two lines were added many years ago, c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2632) It can be a stack frame number or the address of the frame.\n\ c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2633) With argument, nothing is printed if input is coming from\n\ Did you do some archaeology to see how GDB did at that time? and then we may know these help doc is a leftover of some changes. If we can find them, we are confident to remove these doc. I spent 30 minutes on c906108c, but didn't find any evidence.
On 2017-01-09 12:27, Yao Qi wrote: > These two lines were added many years ago, > > c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2632) It can be a > stack frame number or the address of the frame.\n\ > c906108c (Stan Shebs 1999-04-16 01:35:26 +0000 2633) With > argument, nothing is printed if input is coming from\n\ > > Did you do some archaeology to see how GDB did at that time? and then > we may know these help doc is a leftover of some changes. If we can > find them, we are confident to remove these doc. I spent 30 minutes > on c906108c, but didn't find any evidence. Indeed, it's the commit "Initial creation of sourceware repository". I checked out that commit and looked at the code, but couldn't find anything that would suggest that the output of the frame command would not be printed when it's executing in a script or user command. I went earlier using the old tarballs on the website [1], and found that in old gdb's, there was code like this: 965 if (!from_tty) 966 return; 967 968 print_stack_frame (selected_frame, selected_frame_level, 1); The (!from_tty) check disappeared in gdb 4.3. I think it's this change: 873 Thu Oct 24 09:33:44 1991 John Gilmore (gnu at cygnus.com) 874 875 * stack.c (frame_command): Always print. Use new 876 frame_select_command to select a frame without printing. after that, the frame_command function becomes simply: 974 static void 975 frame_command (level_exp, from_tty) 976 char *level_exp; 977 int from_tty; 978 { 979 select_frame_command (level_exp, from_tty); 980 print_stack_frame (selected_frame, selected_frame_level, 1); 981 } So I think it's safe. Side-question, is there a git repo somewhere with all these old gdb versions, those that predate what's in the current git tree? It would be useful to have a repo with one commit per version. Here I had to download many tarballs and bisect manually, but if they had been in a repo it would have been trivial. If it doesn't exist yet, I think I'll do it. [1] ftp://sourceware.org/pub/gdb/old-releases/
On 17-01-09 13:13:42, Simon Marchi wrote: > Indeed, it's the commit "Initial creation of sourceware repository". > I checked out that commit and looked at the code, but couldn't find > anything that would suggest that the output of the frame command > would not be printed when it's executing in a script or user > command. > > I went earlier using the old tarballs on the website [1], and found > that in old gdb's, there was code like this: > > 965 if (!from_tty) > 966 return; > 967 > 968 print_stack_frame (selected_frame, selected_frame_level, 1); > > The (!from_tty) check disappeared in gdb 4.3. I think it's this change: > > 873 Thu Oct 24 09:33:44 1991 John Gilmore (gnu at cygnus.com) > 874 > 875 * stack.c (frame_command): Always print. Use new > 876 frame_select_command to select a frame without printing. > > after that, the frame_command function becomes simply: > > 974 static void > 975 frame_command (level_exp, from_tty) > 976 char *level_exp; > 977 int from_tty; > 978 { > 979 select_frame_command (level_exp, from_tty); > 980 print_stack_frame (selected_frame, selected_frame_level, 1); > 981 } > > So I think it's safe. Thanks for digging it up. Patch is OK. > > Side-question, is there a git repo somewhere with all these old gdb > versions, those that predate what's in the current git tree? It > would be useful to have a repo with one commit per version. Here I > had to download many tarballs and bisect manually, but if they had > been in a repo it would have been trivial. If it doesn't exist yet, > I think I'll do it. > > [1] ftp://sourceware.org/pub/gdb/old-releases/ They were imported into the git repository. The change you found above is in b00771232fab861fb31e42dfd5f6643ba1b43cc9
On 17-01-10 06:00 AM, Yao Qi wrote: > On 17-01-09 13:13:42, Simon Marchi wrote: >> Indeed, it's the commit "Initial creation of sourceware repository". >> I checked out that commit and looked at the code, but couldn't find >> anything that would suggest that the output of the frame command >> would not be printed when it's executing in a script or user >> command. >> >> I went earlier using the old tarballs on the website [1], and found >> that in old gdb's, there was code like this: >> >> 965 if (!from_tty) >> 966 return; >> 967 >> 968 print_stack_frame (selected_frame, selected_frame_level, 1); >> >> The (!from_tty) check disappeared in gdb 4.3. I think it's this change: >> >> 873 Thu Oct 24 09:33:44 1991 John Gilmore (gnu at cygnus.com) >> 874 >> 875 * stack.c (frame_command): Always print. Use new >> 876 frame_select_command to select a frame without printing. >> >> after that, the frame_command function becomes simply: >> >> 974 static void >> 975 frame_command (level_exp, from_tty) >> 976 char *level_exp; >> 977 int from_tty; >> 978 { >> 979 select_frame_command (level_exp, from_tty); >> 980 print_stack_frame (selected_frame, selected_frame_level, 1); >> 981 } >> >> So I think it's safe. > > Thanks for digging it up. Patch is OK. > >> >> Side-question, is there a git repo somewhere with all these old gdb >> versions, those that predate what's in the current git tree? It >> would be useful to have a repo with one commit per version. Here I >> had to download many tarballs and bisect manually, but if they had >> been in a repo it would have been trivial. If it doesn't exist yet, >> I think I'll do it. >> >> [1] ftp://sourceware.org/pub/gdb/old-releases/ > > They were imported into the git repository. The change you found > above is in b00771232fab861fb31e42dfd5f6643ba1b43cc9 > Ah ok, it seems like there is a disconnect at "Initial creation of sourceware repository", my blame tool doesn't allow me to go past that. But indeed, if I manually checkout a previous commit I see the older versions. I added a reference to that commit in my commit log and pushed the patch, thanks.
On 01/10/2017 11:00 AM, Yao Qi wrote: > On 17-01-09 13:13:42, Simon Marchi wrote: >> Side-question, is there a git repo somewhere with all these old gdb >> versions, those that predate what's in the current git tree? It >> would be useful to have a repo with one commit per version. Here I >> had to download many tarballs and bisect manually, but if they had >> been in a repo it would have been trivial. If it doesn't exist yet, >> I think I'll do it. >> >> [1] ftp://sourceware.org/pub/gdb/old-releases/ > > They were imported into the git repository. The change you found > above is in b00771232fab861fb31e42dfd5f6643ba1b43cc9 > Yes, they were imported from here: https://github.com/palves/gdb-old-releases The git history around the initial CVS import is quite annoying, since there were a series of commits that added the whole of gdb, then removed it, then re-added it, etc. I think there are ways in git nowadays to tell (local) git to see through a range of commits, so effectively "virtually squash" those deletions as if they never existed, but I never investigated exactly how to do it. If someone pulls that off, I think it'd be great. Thanks, Pedro Alves
diff --git a/gdb/stack.c b/gdb/stack.c index 64224d0aad..201a358833 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -2666,9 +2666,7 @@ This is useful in command scripts.")); Select and print a stack frame.\nWith no argument, \ print the selected stack frame. (See also \"info frame\").\n\ An argument specifies the frame to select.\n\ -It can be a stack frame number or the address of the frame.\n\ -With argument, nothing is printed if input is coming from\n\ -a command file or a user-defined command.")); +It can be a stack frame number or the address of the frame.\n")); add_com_alias ("f", "frame", class_stack, 1);