This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Hi all, just an onfo about huw to use gcc tree


Where could I find any toturial about?
Could you suggest me how to start? I'm a newby in this.

Thanks a lot


Alle 22:30, sabato 3 marzo 2007, Richard Guenther ha scritto:
> On 3/3/07, Fabio Giovagnini <fabio.giovagnini@aurion-tech.com> wrote:
> > Thanks for the answer.
> > I go deeper in my thought so that maybe you can give me more infos about
> > how I have to investagte about gcc/gdb
> >
> > We are developers of embedded software on board designed and build by us;
> > Generally we use 16 bit cisc and 32 bits risc cpu (Renesas h8/h8s; sh 2 /
> > 3 ). We write applications for automotive enviroment mainly.
> > We write the code using c/c++ and we compile using gcc.
> > Because of we do not have much memory (ram and flash) we develop in the
> > following way: each software we write has the same communication protocol
> > running on RS232 or over TCP/IP and we have a simple monitoring progarm
> > able to show the contents of the memory addresses in some format (char,
> > int, long, signed unsigned, strings, ecc).
> > Generally we declare a global variable, we write a debug value into it
> > and during the run time we read at the right moment the content of such a
> > variable.
> > Good.
> > For avoiding to read by hand .map file produced by ld, I developed a flex
> > / bison simple analizer able to extract from .map file the address of a
> > symbol. So into my tool I load the .map file and I write the name of the
> > variable and I can read the content of it.
> > This way of working becomes very hard if I use struct and union in c and
> > classes in c++; I should know the offeset of each field of the struct so
> > addind it to the base address known from the .map file, for each istance
> > of such a struct I coud write "mysrtuct.myfield" into my tool, and,
> > calculating the rigth address, my protocol could ask the target to
> > read/write the content at that address.
> >
> > I prefer to avoid -g option because of my memory is never enough; but a
> > good compromise cound be if I could compile the debug infos into sections
> > I could remove after used by gdb for giving me the informations about the
> > offset of each field. Is it possible?
>
> Just use the dwarf info produced by the compiler with -g and strip the
> binary.  Of course I would debug embedded stuff using a simulator...
>
> Richard.

-- 
Fabio Giovagnini

Aurion s.r.l.
via degli orti 11,
40050 Funo di Argelato (BO)
Tel. +39.335.8350919
Fax +39.051.8659009

www.aurion-tech.com

account telefono VoIP skype (www.skype.com):
aurion.giovagnini


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