D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] GDB

 

Recently I obtained the source code for a project which I am hoping to 
help with (actually, the version I have has been stripped down 
somewhat). It's C++ with wxwidgets. Unfortunately it needs wxwidgets 2.8 
for some reason, so I manually compiled and installed that. All the 
samples provided with it work fine.

The project compiles fine. But when I run it I get a segfault. It works 
fine for the other developer, who runs Ubuntu (I'm running Arch).

Naturally, I'm trying to track this down, but gdb is insisting on being 
very unhelpful about it.
I have added -g flags left, right and centre to the makefile, and I have 
even recompiled wxwidgets with --enable-debug.

Firstly, gdb always says this when starting the program:
Failed to read a valid object file image from memory.

I think that is a bug with gdb that's related to newer kernels, but if 
anyone has any more info on that that would be good.

Then without doing anything, the program segfaults and gives this:

(openlp:12238): GLib-GObject-CRITICAL **: g_cclosure_marshal_VOID__VOID: 
assertion `n_param_values == 1' failed
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1228085552 (LWP 12238)]
0x654a206f in ?? ()

Does anyone have any ideas what the first line could be about?

The last line is driving me nuts- why won't it tell me where the 
segfault is?

I have no idea about multi-threaded programs, which isn't really helping.

The main question at the moment is: can I tell gdb to "run", but give 
output like I was saying "step" each time? That would probably give me 
the answer. I starting manually stepping, but wxwidgets seems to have a 
lot of code that it goes through, and I'm not convinced that I'm not 
going round in circles.

Thanks
Simon

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html