From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22261 invoked by alias); 29 Mar 2004 14:21:22 -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 22253 invoked from network); 29 Mar 2004 14:21:20 -0000 Received: from unknown (HELO miranda.se.axis.com) (193.13.178.2) by sources.redhat.com with SMTP; 29 Mar 2004 14:21:20 -0000 Received: from axis.com (ironmaiden.se.axis.com [10.13.8.120]) by miranda.se.axis.com (8.12.9/8.12.9/Debian-5local0.1) with ESMTP id i2TELJUm022660 for ; Mon, 29 Mar 2004 16:21:19 +0200 Message-ID: <406830DF.10109@axis.com> Date: Mon, 29 Mar 2004 14:21:00 -0000 From: Orjan Friberg Organization: Axis Communications User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Function argument no longer in register Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00716.txt.bz2 Hi all, What should happen when a function argument goes out of scope because the register used to pass it is now used for something else? I encountered the following situation: foo (char *str) { ... i = bar (); ... } The str argument is passed in register r10, which is then overwritten with the return value from bar. If I stop somewhere after the call to bar and try to "print str", GDB will try to read from the address pointed out by r10 (i.e. sends an 'm' packet to the remote stub). I don't know what kind of problem I'm looking at here. Could it be that the debug information is wrong? I'm guessing GDB somehow fails to realize that the function argument is out of scope at this point. -- Orjan Friberg Axis Communications