aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: How to make a backtrace without a headache?  (Read 1623 times)

macias

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 110
How to make a backtrace without a headache?
« on: August 09, 2006, 09:46:08 AM »

Hello,

  I compiled amule in debug mode however I have problems running it in such a mode. Maybe I didn't understand wiki page about backtrace correctly:
a) via gdb -- annoying, since I can't (don't know how to) run amule automatically, each time I have to type "run" in gdb; also when the program crashes I am still in gdb and I can't (don't know how to) set the audible indicator about crash

b) unlimited core dump -- I have 2GB RAM and I am afraid that on crash, the core file could be 2GB in size -- it is problem for me because I don't have 2GB free space on my disk

  So how could I easily run amule in debug mode, fully automatically, and not worrying about space left on disk?

Thanks for any help, bye
Logged

Gerd78

  • Hero Member
  • *****
  • Karma: 9
  • Offline Offline
  • Posts: 681
Re: How to make a backtrace without a headache?
« Reply #1 on: August 09, 2006, 10:57:42 AM »

(a) That's the way gdb works, you have to live with it

(b) You don't need to create core files at all

Just use this script to start aMule:
Code: [Select]
#!/bin/sh
gdb amule << EOF
run
bt
bt full
thread apply all bt
EOF
« Last Edit: August 09, 2006, 11:00:47 AM by Gerd78 »
Logged

macias

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 110
Re: How to make a backtrace without a headache?
« Reply #2 on: August 13, 2006, 10:13:27 AM »

Thanks a lot, could you just take a look at:

http://forum.amule.org/thread.php?threadid=10789&sid=

and see if I did everything ok?

have a nice day, bye
Logged

macias

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 110
Re: How to make a backtrace without a headache?
« Reply #3 on: September 04, 2006, 11:51:06 AM »

Quote
Originally posted by Gerd78
(a) That's the way gdb works, you have to live with it
[/code]

I found out (trivial after all) that I could add "quit" and after the whole script I could run mplayer for example. So I can get both -- run gdb and have audible indicator of the crash.

Thanks again, bye
Logged