🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #1259

arm-elf-gdb (insight) -- issue with finish command (in Thumb mode)

#1259
From: Michael Anburaj
Date: Thu, 17 Mar 2005 17:53
86 lines
3648 bytes
Hi, 

I see this weird behavior with arm-elf-gdb -w
(insight) while issuing the �finish� command within a
particular �while� loop compiled in thumb mode. 

Target hardware: ARM7TDMI-S with Redboot in the Flash 
Development platform : Windows/Cgywin 
Compilation flags: -g -O0 
Code is built for Thumb mode & loaded at free RAM
address. 

The source for this test program includes a c file
(Thumb mode) containing the code listed below & a .S
(ARM mode) that has the entry point, which just
initializes the sp & branch to entry_func. 
I load the elf image using �remote target /dev/com1� &
then set breakpoints within entry_func at the
following statements: function call to func1() & the
while(1). 
After the code breaks at the 1st breakpoint, I
step-into the function �func1' & then into func4. Then
I issue �finish� commands, 1st finish takes me back to
func1 at the while & the following 3 �finish� commands
execute the while & after the 3rd time the code breaks
at the while(1) in entry_func. Which is because gdb
issues a �$c� <for continue � from the remote-log>
without setting a breakpoint (UNDEF instruction) at
address following �bl func1' at entry_func. 

Why?? Idealy the very 1st time I issue the 'finish' at
func1 it should have executed the while loop 3 times &
should have broken at the caller 'entry_func'.

Where as the same code built for ARM mode works
better. 

Thanks, 
-Mike. 


///////////// Code ///////////////// 

volatile int ii; 

void func4() 
{ 
ii = ii+2; 
} 

void func1() 
{ 
int k=0; 

while(k++<3){func4();} 
} 

void func2() 
{ 
ii += 3; 
} 

void func3() 
{ 
ii += 4; 
} 

void entry_func(void) 
{ 
func1(); 

func2(); 

func3(); 

while(1); 

}



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
Technical Details
Message-ID: <mailman.4366.1111212682.32256.bug-gdb@gnu.org>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f5053,8c95f48e274ffb6c,start
X-Google-Attributes: gidf5053,public
X-Google-Language: ENGLISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
From: Michael Anburaj <embeddedeng@yahoo.com>
Newsgroups: gnu.gdb.bug
Subject: arm-elf-gdb (insight) -- issue with finish command (in Thumb mode)
Date: Thu, 17 Mar 2005 09:53:46 -0800 (PST)
Lines: 88
Approved: bug-gdb@gnu.org
Message-ID: <mailman.4366.1111212682.32256.bug-gdb@gnu.org>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1111211757 23040 199.232.76.165 (19 Mar 2005 05:55:57 GMT)
X-Complaints-To: news@news.stanford.edu
To: bug-gdb@gnu.org
Envelope-to: bug-gdb@gnu.org
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com;
 b=Ib5x6VzSJxWlrr1AfrufDvBRwDj96/Nlagp7GCvWVjkO729l3jfnCEDfxdxjtF21GdrAv6oAmMQHTzI/ZObld9zFC4WC0itmC0J16m+PJodvb4/7L48xxklAFU/0CeBBWtkizbl4Xeiw85wuicxnFm6+QjrSvXxGhu9T0zD+pR4=
 ;
X-Mailman-Approved-At: Sat, 19 Mar 2005 01:11:21 -0500
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>,
 <mailto:bug-gdb-request@gnu.org?subject=subscribe>