public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Stack trace function
@ 2005-03-16  5:35 balan h
  2005-03-16  6:19 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: balan h @ 2005-03-16  5:35 UTC (permalink / raw)
  To: ecos-discuss

is there any stack trace function implemented in Ecos
Arm HAL to print the last n function context pointers
?

thanks
bala


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Stack trace function
  2005-03-16  5:35 [ECOS] Stack trace function balan h
@ 2005-03-16  6:19 ` Gary Thomas
  2005-03-16  9:00   ` [ECOS] arm-elf-gdb with remote stubs Michael Anburaj
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2005-03-16  6:19 UTC (permalink / raw)
  To: balan h; +Cc: eCos Discussion

On Tue, 2005-03-15 at 14:32 -0800, balan h wrote:
> is there any stack trace function implemented in Ecos
> Arm HAL to print the last n function context pointers

Not directly in eCos.  You can use the 'bt' command in GDB
to get this information.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] arm-elf-gdb with remote stubs
  2005-03-16  6:19 ` Gary Thomas
@ 2005-03-16  9:00   ` Michael Anburaj
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Anburaj @ 2005-03-16  9:00 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-16  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-16  5:35 [ECOS] Stack trace function balan h
2005-03-16  6:19 ` Gary Thomas
2005-03-16  9:00   ` [ECOS] arm-elf-gdb with remote stubs Michael Anburaj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).