From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13149 invoked by alias); 3 Dec 2004 18:15:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13031 invoked from network); 3 Dec 2004 18:15:06 -0000 Received: from unknown (HELO arwen.tausq.org) (64.81.244.109) by sourceware.org with SMTP; 3 Dec 2004 18:15:06 -0000 Received: by arwen.tausq.org (Postfix, from userid 1000) id AA8D66BDED; Fri, 3 Dec 2004 10:15:05 -0800 (PST) Date: Fri, 03 Dec 2004 18:15:00 -0000 From: Randolph Chung To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/RFA] multiarch INSTRUCTION_NULLIFIED Message-ID: <20041203181505.GF6359@tausq.org> Reply-To: Randolph Chung References: <20041130065620.GT6359@tausq.org> <41AC88B2.5070501@gnu.org> <20041130164401.GV6359@tausq.org> <41ACA6BE.5080603@gnu.org> <20041130173841.GW6359@tausq.org> <41AE3759.3030503@gnu.org> <20041201223243.GK6359@tausq.org> <41AE5434.9050901@gnu.org> <20041202052417.GM6359@tausq.org> <41B0ABC7.4020806@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41B0ABC7.4020806@gnu.org> X-GPG: for GPG key, see http://www.tausq.org/gpg.txt User-Agent: Mutt/1.5.6+20040722i X-SW-Source: 2004-12/txt/msg00072.txt.bz2 > 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/