[ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx

mohasin.zaki@wipro.com mohasin.zaki@wipro.com
Mon Apr 26 07:22:00 GMT 2004


Hi Mohanlal,

Thankz for pointing out that mistake.

I tried running my application again, without doing the 'b'. But I am
still hitting the breakpoint.

Look at the new output below.

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

$ /opt/ecos/gnutools/i386-elf/bin/i386-elf-gdb.exe -nw hello
GNU gdb 5.3 (eCosCentric)
Copyright 2002 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=i386-elf"...
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
85      cyg_libc_invoke_atexit_handlers( void )
Current language:  auto; currently c++
(gdb) load hello
Loading section .text, size 0x60d2 lma 0x108000
Loading section .rodata, size 0x5bc lma 0x10e0d8
Loading section .data, size 0x208 lma 0x10e698
Start address 0x108000, load size 26774
Transfer rate: 30598 bits/sec, 314 bytes/write.
(gdb) cont
Continuing.
[New Thread 1]

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
85      cyg_libc_invoke_atexit_handlers( void )
(gdb)

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

Is there anything wrong with the output now ?.

Thankz,
Mohasin

-----Original Message-----
From: mohanlal jangir [mailto:mohanlaljangir@hotmail.com] 
Sent: Monday, April 26, 2004 11:27 AM
To: Syed Mohasin Zaki (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS);
ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Problem running applications. Breakpoint getting set
automatically at atexit.cxx

(gdb) b
Breakpoint 1 at 0x6b00: file
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/
c/libc/startup/v2_0/src/atexit.cxx, line 85.

Command "b" sets this breakpoint.

Regards
Mohanlal


----- Original Message -----
From: <mohasin.zaki@wipro.com>
To: <ecos-discuss@ecos.sourceware.org>
Sent: Monday, April 26, 2004 11:28 AM
Subject: [ECOS] Problem running applications. Breakpoint getting set
automatically at atexit.cxx



Hi,

I am facing problems running applications.

I was running x86 PC with GDB stubs included (No redboot). I was able to
load the sample applications (hello, twothreads, etc..) and run them.

When I did "info threads" from the GDB prompt, I was not able to see
other threads other than my applications'.

Then I thought it should be because, I had not included the kernel
package (as a result other threads were not running).
So what I did was I included the kernel package and build the boot image
and booted the x86 PC.

This time I could see an "idle thread" running, when I did "info
threads".

The problem I am facing now is that, when I connect to target using GDB,
a
Breakpoint is getting set automatically at atexit.cxx (line:85). Also
when I load
the application and do a "cont", it looks like the execution is stuck at
that breakpoint.

What could be wrong here ?. (I did not set this breakpoint)

Was my idea of including the kernel package correct ?.

Or is it that, on a x86 PC target, we test the applications without
including the kernel package ?.

Please help me with this, as I stuck with this for quite some time.

I am pasting the GDB out below.


Thanks and Regards,
Mohasin


----------------------------START--------------------------------

$ /opt/ecos/gnutools/i386-elf/bin/i386-elf-gdb.exe -nw hello
GNU gdb 5.3 (eCosCentric)
Copyright 2002 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=i386-elf"...
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
85      cyg_libc_invoke_atexit_handlers( void )
Current language:  auto; currently c++
(gdb) b
Breakpoint 1 at 0x6b00: file
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/
c/libc/startup/v2_0/src/atexit.cxx, line 85.
(gdb) info threads
* 1 Thread 1 ( Name: Idle Thread, State: running, Priority: 31 )
0x00006b00 in
?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
(gdb)
(gdb) load
Loading section .text, size 0x60d2 lma 0x108000
Loading section .rodata, size 0x5bc lma 0x10e0d8
Loading section .data, size 0x208 lma 0x10e698
Start address 0x108000, load size 26774
Transfer rate: 30598 bits/sec, 314 bytes/write.
(gdb) cont
Continuing.

Breakpoint 1, 0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
85      cyg_libc_invoke_atexit_handlers( void )
(gdb) info threads
* 1 Thread 1 ( Name: Idle Thread, State: running, Priority: 31 )
0x00006b00 in
?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
(gdb) bt
#0  0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
#1  0x00003bb1 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
r
c/atexit.cxx:85
(gdb)

----------------------------END--------------------------------

Confidentiality Notice

The information contained in this electronic message and any attachments
to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

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



Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

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



More information about the Ecos-discuss mailing list