public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RE: SIGTRAP problem.
@ 2001-08-01 13:58 Trenton D. Adams
  2001-08-01 14:06 ` Cristiano Ligieri Pereira
  0 siblings, 1 reply; 5+ messages in thread
From: Trenton D. Adams @ 2001-08-01 13:58 UTC (permalink / raw)
  To: 'Trenton D. Adams', eCos Discussion

I'm a moron, it takes a pointer for the third parameter.

On top of that, it shouldn't be in a loop.

Neither solves my problem though. 
  > -----Original Message-----
  > From: Trenton D. Adams [ mailto:tadams@extremeeng.com ]
  > Sent: Wednesday, August 01, 2001 2:48 PM
  > To: eCos Discussion (ecos-discuss@sourceware.cygnus.com)
  > Subject: SIGTRAP problem.
  > 
  > I got the output below from my program.  Not the SIGTRAP.  I have no
  > idea what that is.
  > 
  > TRACE: <1>[69]void cyg_prestart() This is the system default
  > cyg_prestart()
  > TRACE: <1>[79]void cyg_package_start() This is the system default
  > cyg_package_start()
  > TRACE: <4>[107]void cyg_libc_invoke_main() main() has returned with
code
  > 0. Calling exit()
  > TRACE: <4>[84]void exit() Calling fflush( NULL )
  > BOOTP[eth0] op: REPLY
  >        htype: Ethernet
  >         hlen: 6
  >         hops: 0
  >          xid: 0x8A2D9C37
  >         secs: 0
  >        flags: 0x80
  >        hw_addr: 00:00:00:00:9C:37
  >      client IP: 0.0.0.0
  >          my IP: 172.16.1.11
  >      server IP: 172.16.1.1
  >     gateway IP: 0.0.0.0
  >   options:
  >         DHCP message: 5 ACK
  >         subnet mask: 255.255.255.0
  >         DHCP time 51: 2147483647
  >         DHCP server id: 172.16.1.1
  > Starting Threads!
  > Command Thread!
  > [New thread 6]
  > 
  > Program received signal SIGTRAP, Trace/breakpoint trap.
  > [Switching to thread 6]
  > 0xdfb3eb44 in ?? ()
  > (gdb)
  > 
  > 
  > Here's the mean code that doesn't like me.  It only happens when I
do an
  > accept.  OpenListenSocket () opens the socket with socket () and
bind
  > ().  Then when accept is called it gets this SIGTRAP.  What is a
  > SIGTRAP?  I assume I made a booboo somewhere!?
  > 
  > void CommandThread (cyg_addrword_t data)
  > {
  >     int commandListenSocket,
  >         commandSocket;
  > 
  >     struct sockaddr_in addr;
  > 
  >     if (!OpenListenSocket (&commandSocket, COMMANDPORT_NUM))
  >         return;
  > 
  >     while (1)
  >     {
  >         diag_printf ("Command Thread!\n");
  >         accept (commandListenSocket, &addr, sizeof (addr));
  > 
  >         cyg_thread_delay (100); // one second
  >     }
  > 
  > }
  > 
  > 
  > Trenton D. Adams
  > Embedded Developer
  > Windows Developer
  > Extreme Engineering Ltd.
  > Calgary Alberta
  > 
  > Phone: 403 640 9494 ext 208
  > Fax:   403 640 9599
  > 


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

* Re: [ECOS] RE: SIGTRAP problem.
  2001-08-01 13:58 [ECOS] RE: SIGTRAP problem Trenton D. Adams
@ 2001-08-01 14:06 ` Cristiano Ligieri Pereira
  2001-08-01 14:11   ` Trenton D. Adams
  2001-08-01 14:24   ` Trenton D. Adams
  0 siblings, 2 replies; 5+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-01 14:06 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: eCos Discussion

I've got the same error message some time ago and was wondering the same
thing. Here is what Gary Thomas replied me:

> What's the exact meaning of this [error] message? 
> 
> "Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x62160 in some_function ()"
> 
> Is it an error in my application? If not, can I avoid (by doing some
> configuration) having it stopping my application. 
> 

It definitely is in you application.  Since eCos is designed for embedded
use, it makes no sense [normally] to go on if such a thing happens, as
this is often quite serious.  You'll have to debug your application and
fix it, sorry.

> PS: It comes out from the Compaq Ipaq running eCos. I'm using the serial
> port to debug it and see the messages.

I'd guess it means that the program ran away and ended up executing
garbage.

Basically, the error means that there was some sort of execution
error - probably an illegal instruction.

First thing would be to use GDB and see if you can get a backtrace.
Then you can figure out how it got there.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira


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

* RE: [ECOS] RE: SIGTRAP problem.
  2001-08-01 14:06 ` Cristiano Ligieri Pereira
@ 2001-08-01 14:11   ` Trenton D. Adams
  2001-08-01 14:23     ` Cristiano Ligieri Pereira
  2001-08-01 14:24   ` Trenton D. Adams
  1 sibling, 1 reply; 5+ messages in thread
From: Trenton D. Adams @ 2001-08-01 14:11 UTC (permalink / raw)
  To: 'Cristiano Ligieri Pereira'; +Cc: 'eCos Discussion'

Did yours happen in one of your functions, or inside a function in eCos?

Mine is happening in accept ().  Is that where yours happened?

  > -----Original Message-----
  > From: Cristiano Ligieri Pereira [ mailto:cpereira@ics.uci.edu ]
  > Sent: Wednesday, August 01, 2001 3:06 PM
  > To: Trenton D. Adams
  > Cc: eCos Discussion
  > Subject: Re: [ECOS] RE: SIGTRAP problem.
  > 
  > 
  > I've got the same error message some time ago and was wondering the
same
  > thing. Here is what Gary Thomas replied me:
  > 
  > > What's the exact meaning of this [error] message?
  > >
  > > "Program received signal SIGTRAP, Trace/breakpoint trap.
  > > 0x62160 in some_function ()"
  > >
  > > Is it an error in my application? If not, can I avoid (by doing
some
  > > configuration) having it stopping my application.
  > >
  > 
  > It definitely is in you application.  Since eCos is designed for
  > embedded
  > use, it makes no sense [normally] to go on if such a thing happens,
as
  > this is often quite serious.  You'll have to debug your application
and
  > fix it, sorry.
  > 
  > > PS: It comes out from the Compaq Ipaq running eCos. I'm using the
  > serial
  > > port to debug it and see the messages.
  > 
  > I'd guess it means that the program ran away and ended up executing
  > garbage.
  > 
  > Basically, the error means that there was some sort of execution
  > error - probably an illegal instruction.
  > 
  > First thing would be to use GDB and see if you can get a backtrace.
  > Then you can figure out how it got there.
  > 
  > ------------------------------------------------------------
  > Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
  > 


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

* RE: [ECOS] RE: SIGTRAP problem.
  2001-08-01 14:11   ` Trenton D. Adams
@ 2001-08-01 14:23     ` Cristiano Ligieri Pereira
  0 siblings, 0 replies; 5+ messages in thread
From: Cristiano Ligieri Pereira @ 2001-08-01 14:23 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: 'eCos Discussion'

The source of the problem was varying but mostly in the eCos code. I was
playing with the core frequency of the processor the cause of the problem
was that the memory was getting inaccessible.

I don't thing it helps you on solving your problem, but at least give you
an idea on what might cause a SIGTRAP.

Cristiano.

------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira

On Wed, 1 Aug 2001, Trenton D. Adams wrote:

> Did yours happen in one of your functions, or inside a function in eCos?
> 
> Mine is happening in accept ().  Is that where yours happened?
> 
>   > -----Original Message-----
>   > From: Cristiano Ligieri Pereira [ mailto:cpereira@ics.uci.edu ]
>   > Sent: Wednesday, August 01, 2001 3:06 PM
>   > To: Trenton D. Adams
>   > Cc: eCos Discussion
>   > Subject: Re: [ECOS] RE: SIGTRAP problem.
>   > 
>   > 
>   > I've got the same error message some time ago and was wondering the
> same
>   > thing. Here is what Gary Thomas replied me:
>   > 
>   > > What's the exact meaning of this [error] message?
>   > >
>   > > "Program received signal SIGTRAP, Trace/breakpoint trap.
>   > > 0x62160 in some_function ()"
>   > >
>   > > Is it an error in my application? If not, can I avoid (by doing
> some
>   > > configuration) having it stopping my application.
>   > >
>   > 
>   > It definitely is in you application.  Since eCos is designed for
>   > embedded
>   > use, it makes no sense [normally] to go on if such a thing happens,
> as
>   > this is often quite serious.  You'll have to debug your application
> and
>   > fix it, sorry.
>   > 
>   > > PS: It comes out from the Compaq Ipaq running eCos. I'm using the
>   > serial
>   > > port to debug it and see the messages.
>   > 
>   > I'd guess it means that the program ran away and ended up executing
>   > garbage.
>   > 
>   > Basically, the error means that there was some sort of execution
>   > error - probably an illegal instruction.
>   > 
>   > First thing would be to use GDB and see if you can get a backtrace.
>   > Then you can figure out how it got there.
>   > 
>   > ------------------------------------------------------------
>   > Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
>   > 
> 
> 
> 

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

* RE: [ECOS] RE: SIGTRAP problem.
  2001-08-01 14:06 ` Cristiano Ligieri Pereira
  2001-08-01 14:11   ` Trenton D. Adams
@ 2001-08-01 14:24   ` Trenton D. Adams
  1 sibling, 0 replies; 5+ messages in thread
From: Trenton D. Adams @ 2001-08-01 14:24 UTC (permalink / raw)
  To: 'Cristiano Ligieri Pereira'; +Cc: 'eCos Discussion'

I apologize.  That's the last time I ask a question on the list when I
stayed up playing computer games the night before!!!

I'm a complete moron.  I was trying to accept a connection on a variable
that I hadn't even initialized.

Anyhow, I suppose sleep would be a good thing right about now.

  > -----Original Message-----
  > From: Cristiano Ligieri Pereira [ mailto:cpereira@ics.uci.edu ]
  > Sent: Wednesday, August 01, 2001 3:06 PM
  > To: Trenton D. Adams
  > Cc: eCos Discussion
  > Subject: Re: [ECOS] RE: SIGTRAP problem.
  > 
  > 
  > I've got the same error message some time ago and was wondering the
same
  > thing. Here is what Gary Thomas replied me:
  > 
  > > What's the exact meaning of this [error] message?
  > >
  > > "Program received signal SIGTRAP, Trace/breakpoint trap.
  > > 0x62160 in some_function ()"
  > >
  > > Is it an error in my application? If not, can I avoid (by doing
some
  > > configuration) having it stopping my application.
  > >
  > 
  > It definitely is in you application.  Since eCos is designed for
  > embedded
  > use, it makes no sense [normally] to go on if such a thing happens,
as
  > this is often quite serious.  You'll have to debug your application
and
  > fix it, sorry.
  > 
  > > PS: It comes out from the Compaq Ipaq running eCos. I'm using the
  > serial
  > > port to debug it and see the messages.
  > 
  > I'd guess it means that the program ran away and ended up executing
  > garbage.
  > 
  > Basically, the error means that there was some sort of execution
  > error - probably an illegal instruction.
  > 
  > First thing would be to use GDB and see if you can get a backtrace.
  > Then you can figure out how it got there.
  > 
  > ------------------------------------------------------------
  > Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
  > 


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

end of thread, other threads:[~2001-08-01 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01 13:58 [ECOS] RE: SIGTRAP problem Trenton D. Adams
2001-08-01 14:06 ` Cristiano Ligieri Pereira
2001-08-01 14:11   ` Trenton D. Adams
2001-08-01 14:23     ` Cristiano Ligieri Pereira
2001-08-01 14:24   ` Trenton D. Adams

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).