Help Locating Base Code
Lionel Elie Mamane
lionel at mamane.lu
Wed Aug 8 22:56:21 PDT 2012
On Wed, Aug 08, 2012 at 06:35:18PM -0700, Joel Madero wrote:
> On 08/08/2012 06:01 AM, Michael Meeks wrote:
>> On Wed, 2012-08-08 at 07:32 +0200, Lionel Elie Mamane wrote:
>>> On Tue, Aug 07, 2012 at 06:50:22PM -0700, Joel Madero wrote:
>>>> I'm trying to locate the code that handles the dialog that appears when you
>>>> do the following steps in base:
>>> To answer this kind of questions, I find it useful to run a build
>>> with symbols (debug build) under gdb. Then, when the dialog is
>>> open, just press CTRL-C in gdb
> Thanks for the advice. Unfortunately every time I run "run" and get
> into database I get a segfault in gdb.
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffc2d06700 (LWP 4977)]
And the backtrace (commmand "bt") looks like:
#1 0x454545453 in ?
#2 0x4545abc85 in ?
#3 0x4545df778 in ?
That's Java code hitting an unitialised (object) variable. Just type
"continue". To get gdb to not stop/handle SIGSEGV, but only pass it to
the program, the command is:
handle SIGSEGV pass noprint nostop
But if you are hunting for a "real" segfault, then you'll also miss
the one you are hunting for :) Luckily that is not your case here.
When hunting for a segfault, I usually just type "continue" a few
times until I get to the right one, or I disable gdb's handling of
segfaults until I know the one I want is near, and then reenable it:
handle SIGSEGV pass print stop
Also, before running soffice.bin in gdb, I thought one needed to
"source ooenv". You did that?
> Not sure why. Also mine looks nothing like Lionel's did when he ran
> gdb. Mine looks more like this:
> [New Thread 0x7fffb8fff700 (LWP 4966)]
> [New Thread 0x7fffb8efe700 (LWP 4967)]
> [New Thread 0x7fffb8dfd700 (LWP 4968)]
> [New Thread 0x7fffb8cfc700 (LWP 4969)]
> [New Thread 0x7fffb8bfb700 (LWP 4970)]
> [New Thread 0x7fffb8afa700 (LWP 4971)]
> [New Thread 0x7fffb89f9700 (LWP 4972)]
> [Thread 0x7fffc2d06700 (LWP 4962) exited]
> [New Thread 0x7fffd08a3700 (LWP 4973)]
> [New Thread 0x7fffc2d06700 (LWP 4974)]
> [New Thread 0x7fff93fff700 (LWP 4975)]
> [Thread 0x7fff93fff700 (LWP 4975) exited]
> [Thread 0x7fffc2d06700 (LWP 4974) exited]
> [New Thread 0x7fffc2d06700 (LWP 4977)]
> [New Thread 0x7fffc9667700 (LWP 4978)]
That looks right; I showed you only the interesting portion of the
backtrace command's output, not the whole gdb session.
More information about the LibreOffice