maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Modest and gdb problems (https://talk.maemo.org/showthread.php?t=46111)

matthew_exon 2010-02-28 13:03

Modest and gdb problems
 
I'd like to use gdb to poke around in the internals of modest/tinymail and figure out how it works. I've compiled my own modest and tinymail packages and installed the -dev and -dbg versions of everything. But I'm having trouble figuring out how to get started.

I can invoke modest -s from the command line, but that's the stripped binary. The debug version installs in /usr/lib/debug/usr/bin. This seems to install as non-executable. If I change permission and try to run:

[sbox-FREMANTLE_X86: ~] > chmod a+x /usr/lib/debug/usr/bin/modest
[sbox-FREMANTLE_X86: ~] > /usr/lib/debug/usr/bin/modest -s
Illegal instruction (core dumped)

...so that's no good. If I try to run the version that was compiled:

[sbox-FREMANTLE_X86: ~/modest/modest/modest-3.1.18+0m5/src] > ./modest -s
Segmentation fault (core dumped)

It seems that modest is part of this maemo invoker thing and therefore supposed to be a shared library. Is it possible to run it off the command line as a normal application? Maybe there's some way to simply statically link everything?

lma 2010-02-28 13:11

Re: Modest and gdb problems
 
You need to run it with run-standalone.sh, see http://modest.garage.maemo.org/ (under development).

matthew_exon 2010-02-28 13:48

Re: Modest and gdb problems
 
OK, fair enough. But that dumps core too, in different ways depending on whether I try it with the dbg binary or the version in the build directory:

[sbox-FREMANTLE_X86: ~] > run-standalone.sh /usr/lib/debug/usr/bin/modest
/usr/bin/run-standalone.sh: line 11: 14199 Illegal instruction (core dumped) "$@"

[sbox-FREMANTLE_X86: ~/modest/modest/modest-3.1.18+0m5/src] > run-standalone.sh ./modest
/usr/bin/run-standalone.sh: line 11: 14182 Segmentation fault (core dumped) "$@"

lma 2010-02-28 15:26

Re: Modest and gdb problems
 
Hm, how are you bulding modest? I can't compile either trunk (missing hildon live search bits) or the Fremantle source package (missing calendar-ui-widgets-0-dev dependency) at the moment.

matthew_exon 2010-02-28 16:21

Re: Modest and gdb problems
 
I'm compiling the fremantle source package using the -d flag to ignore the dependency on calendar widgets. This was after finding this post on modest-devel:

http://www.mail-archive.com/modest-d.../msg00042.html

Come to think of it, that's probably a better forum than here to ask questions.

matthew_exon 2010-07-01 18:09

Re: Modest and gdb problems
 
Just a followup: it's not just me. The supplied version of gdb is simply broken. It doesn't work. Don't try to make it work.

http://chaos.troll.no/~harald/gdb7/


All times are GMT. The time now is 19:52.

vBulletin® Version 3.8.8