Re: Unix compiling and linking options

From: Paul Pluzhnikov (ppluzhnikov-nsp_at_charter.net)
Date: 03/31/05


Date: Thu, 31 Mar 2005 07:56:28 -0800

djake@excite.it writes:

> In this way when my customer call me saying a process crash, i get the
> core files and debug in source code. Not assebler!

For this to work, you'll need not only the 'core', but also a system
with the *exact* same shared libraries (patches and all), or you
would not be able to interpret the 'core'.

Some details here:
http://au.sun.com/news/onsun/2001-12/tech_tips.html

In practice, you'll be quite unlikely to be able to interpret the
'core' correctly on any system other then the one it was produced on.

What I do is ask the customer to run whatever debugger commands I
would have performed. The output, coupled with non-stripped
executable, is sufficient to understand where the crash happened.

> Now I ask you: how can i have both the advantage of an high speed
> high performance process and have symbols included for crash debugging?

Use 'gcc -g -O2 ...' as Chuck Dillon suggested.

Cheers,

-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


Relevant Pages

  • Re: New RCorder: abi loaded too late
    ... of core dumping problem). ... cache (MALLOC_OPTIONS='cccccccc' will reduce the delay cache to one ... interpret. ...
    (freebsd-current)
  • Re: read gdb symbols in a program
    ... just like what i get when i do a "bt" by loading the core and binary ... be able to generate the core as well. ... Use gdb to generate that call stack. ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: HP-UX 11.11 overwriting core file(s) - How to prevent?
    ... Do this after the daemon has read all of its config files, ... On the 3 Solaris boxes that I get to use, ... and if a core file was produced, the filename is as I mentioned. ... In order to understand recursion you must first understand recursion. ...
    (comp.sys.hp.hpux)
  • Re: is there problem that "has to" use recursion
    ... you missed his point: The block of core you got ... >) with malloc() is equivalent to the stack frames you would have used in a ... >) Philip is apparently saying that recursion is recursion even if it looks ... you need a scratch pad of some kind. ...
    (comp.programming)
  • Re: How to produce a core-dump *and* continue the program
    ... It is the *kernel* that actually generates 'core' file ... Solaris ships with "gcore" command, ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.system)