Sergio Villar Senin - svil...@igalia.com wrote:
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
That helps, I can run gdb as you suggest. Or at least, I swear it did
work a couple of times. Now I'm finding that only this works:
run-standalone.sh strace -ff -o output run-standalone.sh /usr/bin/gdb modest
Running just from the second run-standalone.sh segfaults. The version
with strace sometimes also complains about freeing an invalid pointer,
but somehow it still works.
But all of this is using stripped binaries, which isn't very useful for
me. When I try running a debug binary in /usr/lib/debug/usr/bin/modest
(after changing permissions so it's executable), I get this:
(gdb) run -s
Starting program: /targets/FREMANTLE_X86/usr/lib/debug/usr/bin/modest -s
During startup program terminated with signal SIGILL, Illegal instruction.
I even tried hacking the rules file so that it would compile without
optimisation and not strip the binaries upon install, but then I
realised that the binary in /usr/bin/modest is just a link to
maemo-invoker and I have no idea where the actual binary ends up. When
I run the gdb command above am I debugging modest or maemo-invoker? I
can see from strace that half a dozen processes get instantiated: which
of those has modest inside?
I'm hopelessly confused by all of this redirection and simulation!
Isn't there any way to just debug a simple binary?
_______________________________________________
Modest-devel mailing list
Modest-devel@garage.maemo.org
https://garage.maemo.org/mailman/listinfo/modest-devel