modest.me...@spamgourmet.com escribiu:
> Hi,
> 
> I'm hoping to hack up modest a little (see explanation below).  But
> right now I just want to see how camel_folder_get_message is being
> called.  I wanted to use gdb and see a backtrace, but of course the live
> binary is stripped.
> 
> So I compiled and installed the dbg versions of modest and tinymail, and
> they're in /usr/lib/debug/usr/[bin|lib]/.  But how do I run them?
> Various attempts all produce various kinds of core dumps:
> 
> [sbox-FREMANTLE_X86: ~] > /usr/lib/debug/usr/bin/modest -s
> Illegal instruction (core dumped)
> 
> [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) "$@"
> 
> I can run the normal binary fine, using either "/usr/bin/modest -s" or
> "run-standalone.sh /usr/bin/modest -s".

In order to make gdb work in sbox you have to do a little trick (it's
already documented in Maemo wiki BTW I don't remember exactly where).

You have to define an this environment variable:
SBOX_REDIRECT_IGNORE=/usr/bin/gdb

and then just run

run-standalone /usr/bin/gdb modest

don't forget to pass the "-s" parameter to modest inside gdb

<gdb> run -s

In order to avoid all this mess I just have in my .bashrc this

alias gdb='SBOX_REDIRECT_IGNORE=/usr/bin/gdb run-standalone.sh /usr/bin/gdb'

so I just need to do "gdb /usr/bin/modest" and everything works as expected

> As for what I'm trying to achieve...
> 
> I want to synchronise folders for offline reading.  Looking at camel and
> tinymail, there's heaps of functionality built-in for this, and I'm
> hoping that it just needs to be switched on.  Failing that, I could
> write a function that loops over every message in the folder calling
> <something>_get_message to ensure that the message is cached locally.  I
> thought I could add a d-bus call to invoke that so I can do my own hacky
> sync from the command line when I want to.

That's right, you just need to get the TnyFolder instance, use the
get_headers_async function to retrieve the headers, and perform a
get_header_async over every header. Remember to *always* use the
asynchronous functions as the synchronous ones are deprecated.

Br
_______________________________________________
Modest-devel mailing list
Modest-devel@garage.maemo.org
https://garage.maemo.org/mailman/listinfo/modest-devel

Reply via email to