<div dir="ltr"><div style>Hi,</div><div><br></div><div style>I herewith attached a patch to support ELF coredumps.</div><div style>Currently it works for Linux X86-64 core files.</div><div style>Please commit it.</div><div style>
<br></div><div style>Here is the output of a test program</div><div style><br></div><div style><div>$Debug+Asserts/bin/lldb ~/test/a.out -c ~/test/core</div><div>Core file '/mts/home3/jacobs/test/core' (x86_64) was loaded.</div>
<div>Process 0 stopped</div><div>* thread #1: tid = 0x0000, 0x00000000004004c4 a.out`function4(arg=0) + 16 at test.c:4, stop reason = signal SIGSEGV</div><div> frame #0: 0x00000000004004c4 a.out`function4(arg=0) + 16 at test.c:4</div>
<div> 1 void function4(unsigned int arg)</div><div> 2 {</div><div> 3 char *local = 0;</div><div>-> 4 *local = 0;</div><div> 5 }</div><div> 6 void function3()</div><div> 7 {</div>
<div>bt</div><div>* thread #1: tid = 0x0000, 0x00000000004004c4 a.out`function4(arg=0) + 16 at test.c:4, stop reason = signal SIGSEGV</div><div> frame #0: 0x00000000004004c4 a.out`function4(arg=0) + 16 at test.c:4</div>
<div> frame #1: 0x00000000004004d7 a.out`function3 + 11 at test.c:8</div><div> frame #2: 0x00000000004004e7 a.out`function2(arg=4195559) + 11 at test.c:11</div><div> frame #3: 0x00000000004004f7 a.out`function1(arg1=0, arg2=140736328348032, str=0x00000000004004e7) + 3 at test.c:15</div>
<div> frame #4: 0x0000000000400507 a.out`function1(arg1=0, arg2=140736328348048, str=0x00000000004004f7) + 19 at test.c:15</div><div> frame #5: 0x00007fbcdfe6c76d libc.so.6`__libc_start_main + 237</div><div> frame #6: 0x00000000004003f9 a.out`_start + 41</div>
<div><br></div></div><div style>The following may be used as commit log:</div><div><br></div><div>Added Process plugin to support ELF coredump files.</div><div>Added member functions in ObjectFileELF to access segment headers and data.</div>
<div style>Modified POSIX dynamic loader plugin to get AUXV data from core files if core-file is used.</div><div style>Modified Linux Process plugin so that it will skip handling core files(CanDebug()).</div><div><br></div>
<div style>Regards,</div><div style>Samuel</div></div>