This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/2] Fixes to gdb.base/dump.exp: get value from address instead of name
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 22 Jun 2011 09:44:47 -0600
- Subject: Re: [patch 1/2] Fixes to gdb.base/dump.exp: get value from address instead of name
- References: <4E007587.2050304@codesourcery.com> <4E00794D.708@codesourcery.com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> IMO, the intention of tests in this gdb session is to test that "gdb is
Yao> able to load these dump files, and read the correct memory contents from
Yao> them", so it doesn't matter too much that gdb get them via name or
Yao> address. I think the semantics of this part of tests is not changed.
I agree.
Yao> +proc capture_value_with_type { expression } {
I don't fully understand this proc. Some comments would help.
Yao> + if [regexp { \(.*\).*[0-9]+} $expect_out(0,string) output_string] {
Is [0-9]+ really correct?
I would have thought the results would be in hex.
This would be a good spot for a comment describing the expected output.
Yao> + pass "$test $output_string"
Yao> + } else {
Yao> + fail "$test unable to match regexp"
Yao> + }
Passes and fails should use the same text.
Tom