coredump

How to enable full coredumps on OS X?

﹥>﹥吖頭↗ 提交于 2019-11-30 07:27:29
问题 It looks that OS X (10.6) does not generates codedumps by default. Using the ulimit -c unlimited is not a good solution because ulimit does set the limit in an environment variable. This will work only for console applications executed from the shell that executed ulimit. If you have a gui application this will not work. 回答1: You can enable core dumps and then launch your GUI app from the command line using open. $ ulimit -c unlimited $ open /Applications/Address\ Book.app I just looked at

gdb-python : Parsing structure's each field and print them with proper value, if exists

丶灬走出姿态 提交于 2019-11-29 22:37:16
问题 I am writing a python script to automate debugging core dump from gdb. i am trying to print data structure which includes kernel data structures and lists(e.g. struct list_head). For example the structure is something like this: struct my_struct { struct my_hardware_context ahw; struct net_device *netdev; struct pci_dev *pdev; struct list_head mac_list; .... .... }; i am using following API tp print this structure: gdb.execute('p (*(struct my_struct *)dev_base->priv)') so i am able to print

Fork and core dump with threads

家住魔仙堡 提交于 2019-11-29 22:23:38
Similar points to the one in this question have been raised before here and here , and I'm aware of the Google coredump library (which I've appraised and found lacking, though I might try and work on that if I understand the problem better). I want to obtain a core dump of a running Linux process without interrupting the process. The natural approach is to say: if (!fork()) { abort(); } Since the forked process gets a fixed snapshot copy of the original process's memory, I should get a complete core dump, and since the copy uses copy-on-write, it should generally be cheap. However, a critical

Solaris Core dump analysis

江枫思渺然 提交于 2019-11-29 21:04:31
I use pstack to analyze core dump files in Solaris How else can I analyze the core dump from solaris? What commands can be used to do this? What other information will be available from the dump? philant You can use Solaris modular debugger,mdb, or dbx. mdb comes with SUNWmdb (or SUNWmdb x for the 64 bits version) package. A core file is the image of your running process at the time it crashed. Depending on whether your application was compiled with debug flags or not,you will be able to view an image of the stack, hence to know which function caused the core, to get the value of the

How do I prepend a directory the library path when loading a core file in gdb on Linux

无人久伴 提交于 2019-11-29 20:19:54
I have a core file generated on a remote system that I don't have direct access to. I also have local copies of the library files from the remote system, and the executable file for the crashing program. I'd like to analyse this core dump in gdb. For example: gdb path/to/executable path/to/corefile My libraries are in the current directory. In the past I've seen debuggers implement this by supplying the option "-p ." or "-p /=."; so my question is: How can I specify that libraries be loaded first from paths relative to my current directory when analysing a corefile in gdb? Drew Frezell Start

Using a stackdump from Cygwin executable

北城余情 提交于 2019-11-29 19:54:45
So I wrote buggy code that occasionally crash ... and creates a stackdump file. Using addr2line I can figure out how the program got to the crash point by decoding the addresses on by one. Is there an alternative tool that can ease the debug using stack dumps? Is there a way to to load this information in Insight/Gdb? You can instruct Cygwin to start your gdb debugger just in time when an fault occurs. To achieve this, add error_start=action to the Cygwin environment variable: export CYGWIN="$CYGWIN error_start=gdb -nw %1 %2" Else you can have Cygwin generate a real core dump. export CYGWIN="

I have a core dump of an executable that was NOT built with debug symbols. Can I recover argv contents?

一个人想着一个人 提交于 2019-11-29 18:48:40
问题 I have a core dump of an executable that was NOT built with debug symbols. Can I recover argv contents to see what the command line was? If I run gdb, I can see a backtrace, and I can navigate to the main() frame. Once there, is there a way to recover argv, without knowing its exact address? I am on x86_x64 (Intel Xeon CPU) running a CEntOS Linux distro/kernel, One reason I am hopeful is that the core dump seems to show a partial argv. (The program is postgres, and when I load the core file,

ELF core file format

China☆狼群 提交于 2019-11-29 17:09:38
问题 Short of digging through GDB source, where can I find documentation about the format used to create core files? The ELF specification leaves the core file format open, so I guess this should be part of the GDB specifications! Sadly, I did not find any help in this regard from GNU's gdb documentation. Here's what I am trying to do: Map virtual addresses to function names in executable/libraries that comprised the running process. To do that, I would first like to figure out, from the core file

Core dump note section

无人久伴 提交于 2019-11-29 14:54:59
问题 Following my question about manually generating a core dump file, I decided to dive into it and get my hands dirty. I am able to build the basic core dump structure and get my dead program's memory back into the core dump within a big LOAD section. When debugging in GDB, my variables are back, no problem with that. Here comes the tricky part, how do I get GDB to retrieve information about where the program was when it crashed. I know that the note section of the core dump contains this

gdb weird backtrace

前提是你 提交于 2019-11-29 12:54:08
问题 My program is statically compiled with dietlibc. It is compiled on ubuntu x64 (compiled for x86 using the -m32 flag) and is run on a centos x86. The compiled size is only about 100KB. I compile it with -ggdb3 and no optimization flags. My program uses signal.h to handle a SIGSEGV signal and then calls abort(). The program runs without problems for days but sometimes segfaults. This is when I get weird backtraces that I do not understand: username@ubuntu:~/Desktop$ gdb -c core.28569 program