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/
_______________________________________________
Bug-gdb mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gdb