From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14167 invoked by alias); 8 Nov 2010 13:19:27 -0000 Received: (qmail 14065 invoked by uid 22791); 8 Nov 2010 13:19:26 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gy0-f169.google.com (HELO mail-gy0-f169.google.com) (209.85.160.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Nov 2010 13:19:20 +0000 Received: by gyd8 with SMTP id 8so3634169gyd.0 for ; Mon, 08 Nov 2010 05:19:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.154.72 with SMTP id p8mr3416217icw.59.1289222358308; Mon, 08 Nov 2010 05:19:18 -0800 (PST) Received: by 10.231.146.82 with HTTP; Mon, 8 Nov 2010 05:19:18 -0800 (PST) Date: Mon, 08 Nov 2010 13:19:00 -0000 Message-ID: Subject: [patch] solib-display.exp: displays for local variables automatically disabled From: Xingxing Pan To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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 X-SW-Source: 2010-11/txt/msg00114.txt.bz2 FAIL: gdb.base/solib-display.exp: NO: continue FAIL: gdb.base/solib-display.exp: IN: continue FAIL: gdb.base/solib-display.exp: SEP: continue Breakpoint 4, bar () at gdb/testsuite/gdb.base/solib-display-main.c:25^M 25 return main_global + a_local + a_static; /* break here */^M 3: c_global = 43^M 1: a_global = 41^M (gdb) PASS: gdb.base/solib-display.exp: NO: continue display main_global^M 4: main_global = 44^M (gdb) PASS: gdb.base/solib-display.exp: NO: display main_global display a_local^M 5: a_local = 45^M (gdb) PASS: gdb.base/solib-display.exp: NO: display a_local display a_static^M 6: a_static = 46^M (gdb) PASS: gdb.base/solib-display.exp: NO: display a_static start ^M The program being debugged has been started already.^M Start it from the beginning? (y or n) y^M Temporary breakpoint 5 at 0x20005e0: file gdb/testsuite/gdb.base/solib-display- main.c, line 30.^M Starting program: gdb/testsuite/gdb.base/solib-display-main ^M ^M Breakpoint 1, main () at gdb/testsuite/gdb.base/solib- display-main.c:30^M30 bar ();^M warning: Unable to display "a_static": No symbol "a_static" in current context.^M warning: Unable to display "a_local": No symbol "a_local" in current context.^M 4: main_global = 44^M 3: c_global = 43^M 1: a_global = 41^M (gdb) break 25^M Note: breakpoint 4 also set at pc 0x20005a0.^M Breakpoint 6 at 0x20005a0: file gdb/testsuite/gdb.base/solib-display-main.c, line 25.^M (gdb) PASS: gdb.base/solib-display.exp: NO: break 25 continue^M Continuing.^M ^M Breakpoint 4, bar () at gdb/testsuite/gdb.base/solib-display-main.c:25^M 25 return main_global + a_local + a_static; /* break here */^M 4: main_global = 44^M 3: c_global = 43^M 1: a_global = 41^M (gdb) FAIL: gdb.base/solib-display.exp: NO: continue solib-display-main.c: extern int foo (); int main_global = 44; int bar () { int a_local = 45; static int a_static = 46; return main_global + a_local + a_static; /* break here */ } int main () { bar (); return foo (); } After restart to main, the display expressions for A_LOCAL and A_STATIC were disabled automatically because of out of scope (which is different from gdb-6.8). we need to enable them. --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-11-08 Pan Xingxing + + * gdb.base/solib-display.exp: Add 'enable display' + when display expressions for local variables are + disabled automatically because of out of scope. + 2010-11-05 Doug Evans * gdb.base/help.exp: Update expected output. --- a/gdb/testsuite/gdb.base/solib-display.exp +++ b/gdb/testsuite/gdb.base/solib-display.exp @@ -132,6 +132,8 @@ foreach libsepdebug {NO IN SEP} { } gdb_test "" "6: a_static = 46\\r\\n4: main_global = 44\\r\\n.*" + gdb_test "enable display 5" + gdb_test "enable display 6" gdb_test "break [gdb_get_line_number "break here" ${testfile}.c]" \ ".*Breakpoint.* at .*" gdb_test "continue" "6: a_static = 46\\r\\n5: a_local = 45\\r\\n4: main_global = 44\\r\\n.*"