This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
arm-elf-gdb with remote stubs
- From: "Michael Anburaj" <embeddedeng at hotmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 16 Mar 2005 07:52:16 +0000
- Subject: [ECOS] arm-elf-gdb with remote stubs
- Bcc:
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_function.
Why??
Where as the same code built for ARM mode works great.
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);
}
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss