Thanks Cathy --- cwade@... wrote: > > Roy, > We had a similar problem in the past. Here is a > snippet of code which will > save all the pertinent information on the stack so > that you can look at it > with the debugger after an error occurs. > > Good luck, > Cathy > > ************************************************************************ > > C file > > tULONG bus_error_pc_return; > tULONG bus_error_fault_address; > tULONG bus_error_pc_current; > > ASM File > > > XDEF _bus_error_pc_return > XDEF _bus_error_fault_address > XDEF _bus_error_pc_current > > ;******************************************************************** > ; BUS ERROR IRQ Gets BERR frame off stack See > CPU32 manual 6-29 > ;******************************************************************** > > BUS_ERROR_IRQ: > > LINK A6,#0 ;get SP into A6 > MOVE.L (+$06,A6), _bus_error_pc_return ;put > SP+2 in A0 return PC > MOVE.L (+$0C,A6), _bus_error_fault_address ;put > SP+8 in A1 faulted > address > MOVE.L (+$14,A6), _bus_error_pc_current ;put > SP+10 in A2 current PC > > JMP _bus_error_handler > RTE > > ;******************************************************************** > ; ADDRESS ERROR IRQ Gets BERR frame off stack > See CPU32 manual 6-29 > ;******************************************************************** > > ADDRESS_ERROR_IRQ: > > LINK A6,#0 ;get SP into A6 > MOVE.L (+$06,A6), _bus_error_pc_return ;put > SP+2 in A0 return PC > MOVE.L (+$0C,A6), _bus_error_fault_address ;put > SP+8 in A1 faulted > address > MOVE.L (+$14,A6), _bus_error_pc_current ;put > SP+10 in A2 current PC > > JMP _address_error_handler > RTE > > > > > > > > Roy > > > <spectric@yahoo.c To: > 68300@yahoogroups.com > > om> cc: > > > > Subject: [68300] stack frames > > 05/15/02 07:46 AM > > > Please respond to > > > 68300 > > > > > > > > > > > > > Hi all > > I am having problems trying to find the source of an > address error that causes an exception. > > The SSP contains the address of the stack frame, the > format code should tell me the stack frame size, 4, > 6 > or BERR frame. From this I should beable to locate > the address of the offending code that causes the > error but am not having much success, can anyone > provide more info or advice. > > thanks Roy > > __________________________________________________ > Do You Yahoo!? > LAUNCH - Your Yahoo! Music Experience > http://launch.yahoo.com > > > --------------------------------------------------- > To unsubscribe from this group, send an email to: > 68300-unsubscribe@yahoogroups.com > > To learn more about Motorola Microcontrollers, > please visit > http://www.motorola.com/mcu > > > > Your use of Yahoo! Groups is subject to > http://docs.yahoo.com/info/terms/ > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------------------------------------- > To unsubscribe from this group, send an email to: > 68300-unsubscribe@yahoogroups.com > > To learn more about Motorola Microcontrollers, > please visit > http://www.motorola.com/mcu > > > > Your use of Yahoo! Groups is subject to > http://docs.yahoo.com/info/terms/ > > __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com
Message
Re: [68300] stack frames
2002-05-16 by Roy
Attachments
- No local attachments were found for this message.