Summary: | vgcore file for threaded application does not show which thread crashed | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Matthias Schwarzott <zzam> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | florian, hans, tom |
Priority: | NOR | ||
Version: | 3.9.0.SVN | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Refactor coredump writing of one thread: Extract function dump_one_thread
Move crashing thread to first position in coredump Refactor coredump writing of one thread: Extract function dump_one_thread Move crashing thread to first position in coredump |
Description
Matthias Schwarzott
2013-02-15 12:46:44 UTC
Created attachment 77323 [details]
Refactor coredump writing of one thread: Extract function dump_one_thread
Created attachment 77324 [details]
Move crashing thread to first position in coredump
The attached patches change valgrind, so it writes the crashing thread first into the coredump.
Created attachment 86847 [details]
Refactor coredump writing of one thread: Extract function dump_one_thread
Update patches to apply to trunk, r13991
Created attachment 86848 [details]
Move crashing thread to first position in coredump
Is there a reason not to commit this improvement? Btw. I don't know how to write a testcase for this. So you say "the first thread in the coredump is always the crashing one" but in fact you seem to be forcing it to be written last? Is there some documentation somewhere that says how this should be done and how a debugger is supposed to know which is the faulting thread? (In reply to Tom Hughes from comment #6) > So you say "the first thread in the coredump is always the crashing one" but > in fact you seem to be forcing it to be written last? Well, the code adds it last to the list, but it is written in the reverse order. Maybe I should add a comment to the code. > > Is there some documentation somewhere that says how this should be done and > how a debugger is supposed to know which is the faulting thread? For this question I only know how it behaves. I guess the gdb or binutils developers must know this. But there seem to be no real specification of how core-files are thought to be used. (In reply to Matthias Schwarzott from comment #7) > > > Is there some documentation somewhere that says how this should be done and > > how a debugger is supposed to know which is the faulting thread? > For this question I only know how it behaves. > I guess the gdb or binutils developers must know this. > But there seem to be no real specification of how core-files are thought to > be used. From a usability point of view having the crashing thread listed first is a Good Thing IMHO. Committed (with a couple of comments added) as r14181. |