[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] monotone with argp
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] monotone with argp |
Date: |
Tue, 25 Jan 2005 12:55:52 -0800 |
User-agent: |
Mutt/1.5.6+20040907i |
On Wed, Jan 26, 2005 at 06:39:30AM +1000, Badai Aqrandista wrote:
> but i can't get argp to show a list of available options because it gives
> me segfault when i use the option to show them... i think it's the argp
> library that segfault... how do i know where the segfault comes from and
> how do i fix it?
To figure out where a segfault is coming from:
$ gdb monotone
(gdb) set args <args you want to pass to monotone, e.g. --help>
(gdb) run
<program runs for a bit, then gdb tells you that it has segfaulted
and gives you a prompt>
(gdb) bt
<gdb prints out the stack at the time the error occurred>
You can also use gdb to do things like examine the values of various
variables when the segfault occurred, etc.; there are a number of gdb
tutorials out there...
The biggest thing is that for gdb to be very useful, you first have to
compile monotone with the "-g" switch to gcc. The best way to do this
is:
$ ./configure CXXFLAGS="-O0 -g" CFLAGS="-O0 -g"
(which means, compile both C++ and C unoptimized, with debugging
support); as a bonus, compiling without optimization will go an order
of magnitude faster...
-- Nathaniel
--
Eternity is very long, especially towards the end.
-- Woody Allen
- [Monotone-devel] monotone with argp, Badai Aqrandista, 2005/01/25
- Re: [Monotone-devel] monotone with argp, Nathaniel Smith, 2005/01/25
- Re: [Monotone-devel] monotone with argp, Badai Aqrandista, 2005/01/25
- Re: [Monotone-devel] monotone with argp,
Nathaniel Smith <=
- Re: [Monotone-devel] monotone with argp, Matthew A. Nicholson, 2005/01/25
- Re: [Monotone-devel] monotone with argp, Badai Aqrandista, 2005/01/25
- Re: [Monotone-devel] monotone with argp, Matthew A. Nicholson, 2005/01/26
- Re: [Monotone-devel] monotone with argp, Badai Aqrandista, 2005/01/27
- Re: [Monotone-devel] monotone with argp, Ole Laursen, 2005/01/27
- Re: [Monotone-devel] monotone with argp, Derek Scherger, 2005/01/27
- [Monotone-devel] Is there something like libmonotone?, Andreas Känner, 2005/01/27
- Re: [Monotone-devel] Is there something like libmonotone?, Matthew A. Nicholson, 2005/01/27
- Re: [Monotone-devel] Is there something like libmonotone?, Nathaniel Smith, 2005/01/27
- [Monotone-devel] Re: Is there something like libmonotone?, Bruce Stephens, 2005/01/27