Mail Archives: djgpp/2003/05/14/05:45:05
Andre Chrcanovic <alrc AT task DOT com DOT br> wrote:
> What the file boot.def has is:
> #define __BOOT__
> #define __HEADER__
> #define __ENABLE_LAN_BOOT__
> #define __BOOT_PCI__
> #define __DISCO__
This doesn't look like something you should be using the -imacros
option for. A simple #include "boot.def" at the beginning of your
source codes would be the proper way of doing that.
Also note that you're walking on forbidden ground here. Macros
beginning with two underscores are reserved for the implementation
(i.e. for DJGPP libc or GCC internal usage). You're not supposed to
be #define'ing any such macros yourself, ever.
> I compiled all libraries using the -g and -pg flags, but the
> executable generated does not run: it crashes. When I remove -g and
> -pg from the libraries that have some assembly code (I use nasm), the
> executable runs, but the results were the same. What is the influence
> of nasm generated objects in profiling an executable?
IIRC, -pg changes the application binary interface (ABI) of compiled C
code. In particular, the function prologue is a bit different.
Compare gcc -S output to gcc -S -pg output from a simple C source file
to see the difference. Raw assembly routines may or may not comply
with these changes --- only a look at the actual source code can tell.
> Regarding the timers, I change the PC timer and have my own timer
> interrupt routine. I need a 5 ms interrupt to scan telephony
> hardware...
There, you did it. Unless you did that *very* carefully, this almost
certainly is what broke the profile data collection. Gprof relies on
standard timer ticks to do its work.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -