From: Michael Snyder <msnyder@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA]: XFAIL "reread" test for remote targets.
Date: Thu, 22 Feb 2001 17:16:00 -0000 [thread overview]
Message-ID: <3A95B9EF.ACBE9FFB@cygnus.com> (raw)
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.
next reply other threads:[~2001-02-22 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-22 17:16 Michael Snyder [this message]
[not found] ` <3A95C999.7D52C13C@cygnus.com>
2001-02-23 5:35 ` Fernando Nasser
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=3A95B9EF.ACBE9FFB@cygnus.com \
--to=msnyder@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
/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