This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/RFA] multiarch INSTRUCTION_NULLIFIED
> Anyway, more relevant, and as daniel asked, can it be done in assember?
> A starting point for that might be the gdb.asm test case which uses
> assembly source code.
i'm working on it, but getting stuck with a weird problem... i'm seeing
a case where i do:
proc get_addr_of_sym { sym } {
set addr 0
global gdb_prompt
global expect_out
send_gdb "print $sym\n"
gdb_expect 60 {
-re ".*($hex) <$sym>.*$gdb_prompt $" {
set addr $expect_out(1,string)
pass "got address of $sym = $addr"
}
timeout {
fail "cannot get address of $sym (timed out)."
gdb_suppress_tests
}
}
return $addr
}
set foo [get_addr_of_sym "foo"]
set bar [get_addr_of_sym "bar"]
i always get a FAIL on that, and from looking at the log (with --debug)
it seems like the gdb_expect is returning immediately without checking
for results from the previous send_gdb command....
viz:
send: sending "print foo\n" to { exp11 }^M
FAIL: gdb.arch/pa-nullify.exp: cannot get address of foo (timed out).
send: sending "print bar\n" to { exp11 }^M
FAIL: gdb.arch/pa-nullify.exp: cannot get address of bar (timed out).
am i doing something obviously wrong?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/