On 09-Mar-2002 Paul Tremblay wrote:
> On Fri, Mar 08, 2002 at 11:23:41AM -0800, Sean 'Shaleh' Perry wrote:
> 
>> 
>> gdb /path/to/blackbox /path/to/core
>> 
>> you will then get a prompt.  Type 'bt'.  Save the output.
> 
> I just looked at the man pages for gdb. It states (if I am not
> mistaken) that it is customary to use gdb with a specific
> application. In my case, wouldn't I want to type 'gdb
> /usr/X11R6/bin/blackbox' [some other options?] before I start X? 
> 

if you were trying to debug the running program, yes.  More in a moment.

> Also, what does 'unlimit -c unlimited' do?
> 

bash defaults to setting the maximum allowed core file size to 0, i.e. no core
files.

> I obviously know how to type in the path to blackbox after it has
> crashed. But how do I type in the path to the "core"? Again,
> don't I need to set the file of the core when before I start X? 
> (gdg -c=/home/paul/xlog)?
> 

a 'core' file is a dump of the program as it was in memory when it died.  name
goes all the way back to the days of 'core memory'.  When a program segfaults
AND the core size limit does not limit the writing a file called 'core' is
dropped in the directory the program was started in or chdir()/chroot() to. 
For blackbox the dir is likely ~/.  If another program segfaults it will
overwrite the core.  Beware of this.

Back to gdb.  The other way gdb can be run is to diagnose the memory dump (core
file) left behind by a segfault.

Reply via email to