* [RFA]: XFAIL "reread" test for remote targets.
@ 2001-02-22 17:16 Michael Snyder
[not found] ` <3A95C999.7D52C13C@cygnus.com>
0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2001-02-22 17:16 UTC (permalink / raw)
To: gdb-patches
This test only works with the "run" command, therefore will not work on any
remote target. This change sets up an xfail for any gdb stub target.
2001-02-22 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* gdb.base/reread.exp: XFAIL for stub targets;
doesn't work for remote debugging.
Index: gdb.base/reread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/reread.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 reread.exp
*** reread.exp 2000/11/17 16:37:48 1.2
--- reread.exp 2001/02/23 01:14:29
*************** gdb_test "shell touch ${binfile}" "" ""
*** 98,103 ****
--- 98,109 ----
# and reset the breakpoints correctly.
# Should see "Breakpoint 1, foo () at reread2.c:9"
+ # NOTE: This test will not be expected to work on a remote target.
+ if { [target_info exists use_gdb_stub] || \
+ [target_info exists gdb_stub] } then {
+ setup_xfail "*-*-*"
+ }
+
gdb_run_cmd
gdb_expect {
# -re ".*re-reading symbols.*Breakpoint.* foo .* at .*$srcfile2:9.*$gdb_prompt $" {}
From msnyder@cygnus.com Thu Feb 22 18:23:00 2001
From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA]: XFAIL "reread" test for remote targets.
Date: Thu, 22 Feb 2001 18:23:00 -0000
Message-id: <3A95C999.7D52C13C@cygnus.com>
References: <3A95B9EF.ACBE9FFB@cygnus.com>
X-SW-Source: 2001-02/msg00447.html
Content-length: 1937
Michael Snyder wrote:
>
> This test only works with the "run" command, therefore will not work on any
> remote target. This change sets up an xfail for any gdb stub target.
Reworked to use "unsupported" rather than "xfail", on advice from Fernando.
2001-02-22 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* gdb.base/reread.exp: Unsupported for non-native targets;
doesn't work for remote debugging.
Index: gdb.base/reread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/reread.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 reread.exp
*** reread.exp 2000/11/17 16:37:48 1.2
--- reread.exp 2001/02/23 02:21:08
*************** gdb_test "shell touch ${binfile}" "" ""
*** 98,114 ****
# and reset the breakpoints correctly.
# Should see "Breakpoint 1, foo () at reread2.c:9"
! gdb_run_cmd
! gdb_expect {
! # -re ".*re-reading symbols.*Breakpoint.* foo .* at .*$srcfile2:9.*$gdb_prompt $" {}
! -re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" {
! pass "run to foo() second time ";
}
- -re ".*$gdb_prompt $" {
- fail "run to foo() second time";
- gdb_suppress_tests;
- }
- timeout { fail "run to foo() second time (timeout)" ; gdb_suppress_tests }
}
# End of tests.
--- 98,121 ----
# and reset the breakpoints correctly.
# Should see "Breakpoint 1, foo () at reread2.c:9"
! if ![isnative] {
! unsupported "run to foo() second time ";
! } else {
! gdb_run_cmd
! gdb_expect {
! # -re ".*re-reading symbols.*Breakpoint.* foo .* at .*$srcfile2:9.*$gdb_prompt $" {}
! -re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" {
! pass "run to foo() second time ";
! }
! -re ".*$gdb_prompt $" {
! fail "run to foo() second time";
! gdb_suppress_tests;
! }
! timeout {
! fail "run to foo() second time (timeout)" ;
! gdb_suppress_tests
! }
}
}
# End of tests.
From eliz@delorie.com Thu Feb 22 23:56:00 2001
From: Eli Zaretskii <eliz@delorie.com>
To: zackw@stanford.edu
Cc: gdb-patches@sources.redhat.com
Subject: Re: Option to elide single-bit bitfields when printing structures
Date: Thu, 22 Feb 2001 23:56:00 -0000
Message-id: <200102230756.CAA06304@indy.delorie.com>
References: <20010222115633.B11707@wolery.stanford.edu>
X-SW-Source: 2001-02/msg00448.html
Content-length: 2068
> From: "Zack Weinberg" <zackw@stanford.edu>
> Date: Thu, 22 Feb 2001 11:56:33 -0800
>
> (gdb) p decl->common
> $1 = {chain = 0x40253000, type = 0x40253138, code = FUNCTION_DECL,
> side_effects_flag = 0, constant_flag = 0, addressable_flag = 0,
> volatile_flag = 0, readonly_flag = 0, unsigned_flag = 0,
> asm_written_flag = 0, used_flag = 0, nothrow_flag = 0, static_flag = 0,
> public_flag = 1, private_flag = 0, protected_flag = 0, bounded_flag = 0,
> lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, lang_flag_3 = 0,
> lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, dummy = 0}
>
> It's hard to see which are set and which aren't. With this patch, you
> can get it printed like this:
>
> (gdb) set print elide-bitflags on
> (gdb) p decl->common
> $2 = {chain = 0x40253000, type = 0x40253138, code = FUNCTION_DECL, public_flag}
>
> which is, IMHO, much easier to read.
What if someone wants to know which flags are _reset_? What if there
are more than one set flag in your example? What if the bit fields
span more than one bit? I don't see how your suggestion would deal
with these cases in a way that the resulting display is
self-explaining. That trailing "public_flag" is already hard to
understand; I stared at it for a few moments without understanding
what's going on here, before it hit me.
Perhaps we need a special command or a special format that would put
the burden on the user. For example, if the user specifies exactly
what flags (set or unset) does she want to see, the display doesn't
need to explain that, because the user asked for it.
> * cp-valprint.c (elide_bitflag_print): New flag.
> (cp_print_value_fields): If elide_bitflag_print, skip printing
> single-bit fields whose value is zero entirely, and skip
> printing the value for single-bit fields whose value is one.
> (_initialize_cp_valprint): Add 'set print elide-bitflags'
> command, default to old behavior.
If these changes are approved by the cp-valprint maintainer, please
add some minimal changes in gdb.texinfo which describe this feature.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-23 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-22 17:16 [RFA]: XFAIL "reread" test for remote targets Michael Snyder
[not found] ` <3A95C999.7D52C13C@cygnus.com>
2001-02-23 5:35 ` Fernando Nasser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox