From: Xingxing Pan <forandom@gmail.com>
To: gdb-patches@sourceware.org
Subject: [patch] solib-display.exp: displays for local variables automatically disabled
Date: Mon, 08 Nov 2010 13:19:00 -0000 [thread overview]
Message-ID: <AANLkTimJzsXFrQ+9yErKP-V63=Bn=mrQfQHNhTFdf_fq@mail.gmail.com> (raw)
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 <panxingxing@mprc.pku.edu.cn>
+
+ * 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 <dje@google.com>
* 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.*"
next reply other threads:[~2010-11-08 13:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 13:19 Xingxing Pan [this message]
2010-11-08 14:36 ` Jan Kratochvil
2010-11-09 2:38 ` Xingxing Pan
[not found] ` <AANLkTin3WfSRcmZnc2jke_Pebhp0dMM5V==0CJDBR87o@mail.gmail.com>
[not found] ` <20101109024617.GA20814@host0.dyn.jankratochvil.net>
2010-11-09 3:29 ` Xingxing Pan
2010-11-09 3:51 ` Jan Kratochvil
2010-11-09 5:40 ` Xingxing Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTimJzsXFrQ+9yErKP-V63=Bn=mrQfQHNhTFdf_fq@mail.gmail.com' \
--to=forandom@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox