This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/RFA] multiarch INSTRUCTION_NULLIFIED


On Fri, Dec 03, 2004 at 04:09:50PM -0500, Andrew Cagney wrote:
> Randolph Chung wrote:
> 
> Just some nits, fix that, and assuming daniel doesn't notice anything 
> (for a day or til monday?), commit it.
> 
> >+gdb_breakpoint foo
> >+gdb_test "run" ".*Breakpoint 1, .* in foo.*" "Breakpoint at foo"
> 
> The leading .* in the pattern you've picked up from the existing code 
> isn't actually needed (well at least I'm 99% certain of this as I've 
> been stripping them out my self and it makes things more efficient) (the 
> trailing .*s are needed :-):

That's right.  gdb_test_multiple does:
    return [gdb_test_multiple $command $message {
        -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" {

Hmm, that initial bit is completely pointless...

> >+  }
> >+  -re ".*in bar.*$gdb_prompt $" {
> >+    fail "stepped into bar"
> 
> The pass / fail messages should all be identical (except perhaps for a 
> fail where a trailing comment in paren can be added).  So:
> 
> 	fail "$test (stepped into bar)"
> 
> >+  }
> >+  -re ".*in main.*$gdb_prompt $" {
> >+    pass "stepped into main"
> 
> and just:
> 
> 	pass "$test"
> 
> check for the same problem elsewhere.
> 
> >+  gdb_test_multiple "print $sym" "Get address of $sym" {
> >+    -re ".*($hex) <$sym>.*$gdb_prompt $" {
> >+      set addr $expect_out(1,string)
> >+      pass "got address of $sym = $addr"
> >+    }
> >+  }
> 
> Remove the address from the test result (I'm always being slapped for 
> doing that one ;-).  It can make the comparison of subsequent runs, or 
> runs on different systems, harder.

[And make the different test name strings match, as earlier.]

These were the only problems I saw, too.  Fix them and it's OK with me.

> I'd kfail this.  Not supporting gcore is a bug.

Or just fail it for now.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]