public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] signal SIGTRAP, Trace/breakpoint trap???
@ 2001-01-26 14:42 Wilson Kwan
  2001-01-29 10:07 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Wilson Kwan @ 2001-01-26 14:42 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I recently compiled the serial.c example program (using the lastest cvs
sources). I was able to get it running on my target EP7211 board. I made
some changes to it recompiled it and successfully ran it again. Now when I
try to run the program I keep getting a "signal SIGTRAP, Trace/breakpoint
trap???". This started happening after I ran it the second time in
Insight/GDB 5.0 with the eCos patches.

Going back to the command line gdb I still get this problem. I've included a
couple gdb sessions below if it will help. What is going on here? Also after
I set the remote target I get a weird string back from GDB "0xe0001964 in ??
()". Anyone know what this is?

Thanks for any assistance in advance,

Wil Kwan

-------------------

Run 1
=====

$ arm-elf-gdb -nw serial.exe
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf"...
(gdb) set remotebaud 38400
(gdb) target remote com2
Remote debugging using com2
0xe0001964 in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x10000
Loading section .text, size 0xd4a8 lma 0x10044
Loading section .rodata, size 0x5b1 lma 0x1d4ec
Loading section .data, size 0x864 lma 0x1daa0
Start address 0x10044 , load size 58113
Transfer rate: 27347 bits/sec, 304 bytes/write.
(gdb) s
Cannot find bounds of current function
(gdb) c
Continuing.
[New thread 0]

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 0]
0xe0001964 in ?? ()
(gdb)

Run 2
=====

$ arm-elf-gdb -nw serial.exe
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf"...
(gdb) set remotebaud 38400
(gdb) target remote com2
Remote debugging using com2
0xe0001964 in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x10000
Loading section .text, size 0xd4a8 lma 0x10044
Loading section .rodata, size 0x5b1 lma 0x1d4ec
Loading section .data, size 0x864 lma 0x1daa0
Start address 0x10044 , load size 58113
Transfer rate: 27347 bits/sec, 304 bytes/write.
(gdb) si
[New thread 0]
[Switching to thread 0]
0x10048 in warm_reset ()
(gdb) l
91          // main() is present and will call it. But if we're here, then
92          // evidently the user didn't supply one - which can't be right.
So we
93          // assume that they have useful code to run in cyg_user_start()
instead.
94          // Its better than just exiting
95      #ifndef CYGPKG_KERNEL
96          cyg_user_start();
97      #endif
98
99          CYG_REPORT_RETVAL(0);
100         return 0; // some CPUs have 0 hard-wired - faster than a reg
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0xe0001964 in ?? ()
(gdb)

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

* Re: [ECOS] signal SIGTRAP, Trace/breakpoint trap???
  2001-01-26 14:42 [ECOS] signal SIGTRAP, Trace/breakpoint trap??? Wilson Kwan
@ 2001-01-29 10:07 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2001-01-29 10:07 UTC (permalink / raw)
  To: Wilson Kwan; +Cc: ecos-discuss

Wilson Kwan wrote:
> 
> Hi,
> 
> I recently compiled the serial.c example program (using the lastest cvs
> sources). I was able to get it running on my target EP7211 board. I made
> some changes to it recompiled it and successfully ran it again. Now when I
> try to run the program I keep getting a "signal SIGTRAP, Trace/breakpoint
> trap???". This started happening after I ran it the second time in
> Insight/GDB 5.0 with the eCos patches.
> 
> Going back to the command line gdb I still get this problem. I've included a
> couple gdb sessions below if it will help. What is going on here? Also after
> I set the remote target I get a weird string back from GDB "0xe0001964 in ??
> ()". Anyone know what this is?

Note that the message you get with the SIGTRAP:

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 0]
0xe0001964 in ?? ()

reports that the processor is at the same address as when you connected
with target remote. i.e. the target has reset itself for some reason. But
there isn't enough info here to determine exactly _why_ this has happened.

You may want to set breakpoints in places like cyg_hal_invoke_constructors,
or cyg_user_start to see if it reaches those points in the startup
sequence.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

end of thread, other threads:[~2001-01-29 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-26 14:42 [ECOS] signal SIGTRAP, Trace/breakpoint trap??? Wilson Kwan
2001-01-29 10:07 ` Jonathan Larmour

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