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: Why I can't set the breakpoint in the C source code in built ecos library?


Thank you very much Robert. what I meant is: I want to set the breakpoint in
Insight, but when I chose the for example I choose startup.cxx file opened
in Insight and try to set the breakpoint on     cyg_prestart(); of
cyg_start()  function but the Insight even doesn't allow me to do so, while
I can set the breakpoint in the user application in Insight.
BTW if I set the breakpoint at cyg_prestart() prior to launching the Insight
the program will stop at the assembly code rather than the C source code  of
cyg_prestart() . Anything wrong?

-----Original Message-----
From: Robert Cragie [mailto:rcc@jennic.com]
Sent: 13 November 2002 10:05
To: Qiang Huang
Subject: RE: [ECOS] Why I can't set the breakpoint in the C source code in
built ecos library?


You should be able to.

A couple of things worth mentioning:

1) Make sure that you are trying to set a breakpoint in code which is
actually compiled in. There are many #ifdefs in the eCos source, and you may
be trying to set a breakpoint in code which is not compiled in. Try setting
a breakpoint in code where you are 100% sure the code will be compiled in.
2) The optimisation can sometimes confuse setting of breakpoints and single
stepping. Once I had to rebuild the eCos library removing the '-O2'
optimisation as it was so confusing. However, I would only do this as a last
resort.

Try going into the mixed source/assembler view or just assembler view to see
if you can set a breakpoint there.

Robert Cragie, Design Engineer

Direct: +44 (0) 114 281 4512
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
http://www.jennic.com  Tel: +44 (0) 114 281 2655   Confidential
_______________________________________________________________
Visit our stand at Electronica, Munich 12-14 November 2002
_______________________________________________________________

> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Qiang Huang
> Sent: 13 November 2002 09:47
> To: Ecos-Discuss
> Subject: [ECOS] Why I can't set the breakpoint in the C source code in
> built ecos library?
>
>
> Hi all:
>    I have built a ecos library with -g switch for the global compiling and
> linking. and I also compliled user app with -g switch. but when I
> try to use
> Insight to download and debug the program. I can view the C source code
> which is in the ecos library, but I can't set any breakpoint in
> those files.
> I can set breakpoint in the user application souce code. Did I
> miss anything
> in order to use the single stepping and breakpoint through the C source
> code? Thanks a lot.
>
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>


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


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