This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Problem running applications. Breakpoint getting set automatically at atexit.cxx


Ummhh.. but why I am getting problem with all the executables that I've
built.

Also as I have mentioned earlier, I am able to load them as test them as
long as I don't include the eCos kernel package (note that I am not
using redboot here).

I will try building the executables again.

I read in one of the mailing list messages that it could be the problem
with the RAM space available. But it that case, there was crash. But I
am not facing any crash in my case.

http://sources.redhat.com/ml/ecos-discuss/2002-01/msg00482.html

I will try to boot my PC with redboot (with kernel package included) to
see if I am able to load and run my applications in this case.

Thankz a lot for your suggestion.

With Regards,
Mohasin

-----Original Message-----
From: mohanlal jangir [mailto:mohanlaljangir@hotmail.com] 
Sent: Monday, April 26, 2004 12:47 PM
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

I think this is problem in executable building because when you are
connecting to Redboot, the start address is taken at atexit.c:85 and
that's
the reason, it behaves like breakpoint.
Remote debugging using /dev/ttyS0
0x00006b00 in ?? ()
    at
/ecos-c/cygwin/opt/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/s
rc/a
texit.cxx:85

I believe, this should not be the starting address.

Regards
Mohanlal


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



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.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]