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: Valgrind - A Heads Up.


On Mon, 5 Jan 2004, Dirk Broer wrote:

> Having used valgrind for i386-linux, I can attest to its usefulness.
>
> Is there a write-up or any docs on using it with ECOS?

No. They purposely limited the scope of the Valgrind project to make
it "Linux i*86" only to make it all do-able.

However, since synthetic target executables _are_ just linux i386
executables, you can run / debug them directly under the latest
Valgrind.

BUT, since Valgrind doesn't even get to see the heap management or
thread stuff, (since it is handled at what Valgrind would regard as
"user level"), it is less useful, but certainly not useless.

> I assume it can be
> used to debug ECOS itself?
Definitely.

C++ code tends to suffer from people forgetting to initialise all the
instance variables of a class. As far as I can see, there are a couple
of cases of that in eCos.

(I haven't tracked it down exactly where yet, I'm not sure whether it
is the heavy use of the preprocessor confusing me as to which line or
the error is somewhere in the synth HAL asm stuff. I suspect the
latter, but I haven't had the time to track it down. I mention it here
only to say, yes, you can definitely debug eCos it self.)

> How would you get the summary report? ctrl-c in debugger?  Or do you need to
> force an exit in your code?

Force an exit would be best, probably invoke cyg_hal_sys_exit.


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand

A Million Monkeys can inflict worse things than just Shakespeare on
your system.

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