public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
@ 2004-04-26 14:52 mohasin.zaki
  2004-04-26 15:27 ` Gary Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: mohasin.zaki @ 2004-04-26 14:52 UTC (permalink / raw)
  To: nickg; +Cc: mohanlaljangir, ecos-discuss


Thankz Nick,

I am new to eCos and I am kind of running wild to learn and get things
working,  as I am running short of time.

Can you clarify some of the basic doubts that I have ?.

When I am creating a configuration for booting eCos from a floppy, I
select i386 PC Target with Gigabit Ethernet as the hardware and in
packages, I select Redboot. Then I import a file named
redboot_FLOPPY.ecm for the i386 architecture. I set the startup type to
"FLOPPY". On building this, I get a redboot.bin file, which I copy to
the floopy and use the same to boot.

There is an other way, where instead of selecting Redboot, I selected
the "stubs" option to create a boot image.

In both of these options, I was able to load the sample applications
like "hello" and "twothreads".

While these options are selected (reboot or stubs), I did not see the
kernel package to be included. Ie. The eCos kernel package is not
included.

Does that mean that the kernel is not included ?. 

If the kernel is not included, then how come I am able to create 2
threads in the twothreads sample. (Some of the questions may be very
trivial, kindly excuse my stupidity) ?.

Now that I was able to run the sample applications, I thought I will
repeat the same procedure with the eCos kernel package included.

This is when I ran into trouble running the applications (the head of
this thread)


Thankz for all the help.

-Mohasin


-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Nick
Garnett
Sent: Monday, April 26, 2004 2:28 PM
To: Syed Mohasin Zaki (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS)
Cc: mohanlaljangir@hotmail.com; ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Problem running applications. Breakpoint getting set
automatically at atexit.cxx

<mohasin.zaki@wipro.com> writes:

> 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 think you are getting confused here. You must be using RedBoot,
since you are connecting to it when you execute

(gdb) target remote /dev/ttyS0

The breakpoint you see at 0x00006b00 is the breakpoint that RedBoot
has used to put itself into GDB mode. After connecting GDB tries to
interpret this address in terms of the executable it has in
hand. Since the address is outside the executable's address range, GDB
makes its best guess and describes it as belonging to the closest
piece of code, which in your case just happens to be in atexit.cxx.

This address will be changed when you load the executable to be the
start address of the program.

Clearly you will never see threads in your application if you do not
have the kernel installed. 

I suggest that before messing about with advanced configuration
options, like removing the kernel, that you go back and follow the
documentation and get more familiar with eCos as is comes.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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

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

* RE: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
  2004-04-26 14:52 [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx mohasin.zaki
@ 2004-04-26 15:27 ` Gary Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2004-04-26 15:27 UTC (permalink / raw)
  To: mohasin.zaki; +Cc: nickg, mohanlaljangir, eCos Discussion

On Mon, 2004-04-26 at 07:26, mohasin.zaki@wipro.com wrote:
> Thankz Nick,
> 
> I am new to eCos and I am kind of running wild to learn and get things
> working,  as I am running short of time.
> 
> Can you clarify some of the basic doubts that I have ?.
> 
> When I am creating a configuration for booting eCos from a floppy, I
> select i386 PC Target with Gigabit Ethernet as the hardware and in
> packages, I select Redboot. Then I import a file named
> redboot_FLOPPY.ecm for the i386 architecture. I set the startup type to
> "FLOPPY". On building this, I get a redboot.bin file, which I copy to
> the floopy and use the same to boot.
> 
> There is an other way, where instead of selecting Redboot, I selected
> the "stubs" option to create a boot image.

These are two templates for building an embeddeded monitor environment,
either the raw GDB stubs (which can only be used with GDB), or RedBoot
which is a more complete debug & development environment.

> 
> In both of these options, I was able to load the sample applications
> like "hello" and "twothreads".
> 
> While these options are selected (reboot or stubs), I did not see the
> kernel package to be included. Ie. The eCos kernel package is not
> included.
> 
> Does that mean that the kernel is not included ?. 

Neither RedBoot nor the raw stubs use the kernel.

> 
> If the kernel is not included, then how come I am able to create 2
> threads in the twothreads sample. (Some of the questions may be very
> trivial, kindly excuse my stupidity) ?.
> 
> Now that I was able to run the sample applications, I thought I will
> repeat the same procedure with the eCos kernel package included.
> 
> This is when I ran into trouble running the applications (the head of
> this thread)

Building eCos to run applications requires a different configuration 
(i.e. template) than when one is building RedBoot.  To build the thread
test, follow something like this:

  % mkdir ecos_test
  % cd ecos_test
  % mkdir ecos_kernel
  % cd ecos_kernel
  % ecosconfig new pc
  % ecosconfig tree
  % make
  % cd
  % mkdir example
  % cd example
  % cp ${ECOS_REPOSITORY}/../examples/twothreads.c .
  % SRCS=twothreads.c DST=twothreads ${ECOS_REPOSITORY}/../examples/build_Makefile `pwd`/../ecos_kernel
  % make


For a more complete explanation and examples, see 
  http://www.mlbassoc.com/examples

> 
> 
> Thankz for all the help.
> 
> -Mohasin
> 
> 
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Nick
> Garnett
> Sent: Monday, April 26, 2004 2:28 PM
> To: Syed Mohasin Zaki (WT01 - EMBEDDED & PRODUCT ENGINEERING SOLUTIONS)
> Cc: mohanlaljangir@hotmail.com; ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Problem running applications. Breakpoint getting set
> automatically at atexit.cxx
> 
> <mohasin.zaki@wipro.com> writes:
> 
> > 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 think you are getting confused here. You must be using RedBoot,
> since you are connecting to it when you execute
> 
> (gdb) target remote /dev/ttyS0
> 
> The breakpoint you see at 0x00006b00 is the breakpoint that RedBoot
> has used to put itself into GDB mode. After connecting GDB tries to
> interpret this address in terms of the executable it has in
> hand. Since the address is outside the executable's address range, GDB
> makes its best guess and describes it as belonging to the closest
> piece of code, which in your case just happens to be in atexit.cxx.
> 
> This address will be changed when you load the executable to be the
> start address of the program.
> 
> Clearly you will never see threads in your application if you do not
> have the kernel installed. 
> 
> I suggest that before messing about with advanced configuration
> options, like removing the kernel, that you go back and follow the
> documentation and get more familiar with eCos as is comes.
> 
> -- 
> Nick Garnett                    eCos Kernel Architect
> http://www.ecoscentric.com      The eCos and RedBoot experts
> 
> 
> -- 
> 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.
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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

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

* Re: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
  2004-04-26  8:58 mohasin.zaki
@ 2004-04-26  9:41 ` Nick Garnett
  0 siblings, 0 replies; 8+ messages in thread
From: Nick Garnett @ 2004-04-26  9:41 UTC (permalink / raw)
  To: mohasin.zaki; +Cc: mohanlaljangir, ecos-discuss

<mohasin.zaki@wipro.com> writes:

> 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 think you are getting confused here. You must be using RedBoot,
since you are connecting to it when you execute

(gdb) target remote /dev/ttyS0

The breakpoint you see at 0x00006b00 is the breakpoint that RedBoot
has used to put itself into GDB mode. After connecting GDB tries to
interpret this address in terms of the executable it has in
hand. Since the address is outside the executable's address range, GDB
makes its best guess and describes it as belonging to the closest
piece of code, which in your case just happens to be in atexit.cxx.

This address will be changed when you load the executable to be the
start address of the program.

Clearly you will never see threads in your application if you do not
have the kernel installed. 

I suggest that before messing about with advanced configuration
options, like removing the kernel, that you go back and follow the
documentation and get more familiar with eCos as is comes.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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

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

* RE: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
@ 2004-04-26  8:58 mohasin.zaki
  2004-04-26  9:41 ` Nick Garnett
  0 siblings, 1 reply; 8+ messages in thread
From: mohasin.zaki @ 2004-04-26  8:58 UTC (permalink / raw)
  To: mohanlaljangir, ecos-discuss


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

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

* Re: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
  2004-04-26  7:22 mohasin.zaki
@ 2004-04-26  8:55 ` mohanlal jangir
  0 siblings, 0 replies; 8+ messages in thread
From: mohanlal jangir @ 2004-04-26  8:55 UTC (permalink / raw)
  To: mohasin.zaki, ecos-discuss

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/src/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.


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

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

* RE: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
@ 2004-04-26  7:22 mohasin.zaki
  2004-04-26  8:55 ` mohanlal jangir
  0 siblings, 1 reply; 8+ messages in thread
From: mohasin.zaki @ 2004-04-26  7:22 UTC (permalink / raw)
  To: mohanlaljangir, ecos-discuss


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

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

* Re: [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
  2004-04-26  6:07 mohasin.zaki
@ 2004-04-26  6:21 ` mohanlal jangir
  0 siblings, 0 replies; 8+ messages in thread
From: mohanlal jangir @ 2004-04-26  6:21 UTC (permalink / raw)
  To: mohasin.zaki, ecos-discuss

(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



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

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

* [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx
@ 2004-04-26  6:07 mohasin.zaki
  2004-04-26  6:21 ` mohanlal jangir
  0 siblings, 1 reply; 8+ messages in thread
From: mohasin.zaki @ 2004-04-26  6:07 UTC (permalink / raw)
  To: ecos-discuss


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

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

end of thread, other threads:[~2004-04-26 13:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 14:52 [ECOS] Problem running applications. Breakpoint getting set automatically at atexit.cxx mohasin.zaki
2004-04-26 15:27 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2004-04-26  8:58 mohasin.zaki
2004-04-26  9:41 ` Nick Garnett
2004-04-26  7:22 mohasin.zaki
2004-04-26  8:55 ` mohanlal jangir
2004-04-26  6:07 mohasin.zaki
2004-04-26  6:21 ` mohanlal jangir

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