Re: backtraces at runtime in Linux
From: Andrei Voropaev (avorop_at_mail.ru)
Date: 07/27/04
- Next message: Doru-Catalin Togea: ""Resource temporarily unavailable": a firewall issue?"
- Previous message: Richy2004: "Semaphore behaviour"
- In reply to: John Reiser: "Re: backtraces at runtime in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Jul 2004 10:34:25 GMT
On 2004-07-26, John Reiser <jreiser@BitWagon.com> wrote:
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
>
> char str[100+4096];
> char path[4096];
> path[readlink("/proc/self/exe", path, -1+ sizeof(path))] = '\0';
> sprintf(str, "echo 'bt\ndetach\nquit\n' | gdb -batch -x /dev/stdin %s %d\n",
> path, (int)getpid() );
> system(str);
>
Perfect, thanks.
Andrei
- Next message: Doru-Catalin Togea: ""Resource temporarily unavailable": a firewall issue?"
- Previous message: Richy2004: "Semaphore behaviour"
- In reply to: John Reiser: "Re: backtraces at runtime in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]