<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [FreeBSD] lldb is missing ObjectFile plugin to write cores"
href="https://bugs.llvm.org/show_bug.cgi?id=34590">34590</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[FreeBSD] lldb is missing ObjectFile plugin to write cores
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gergely.czuczy@harmless.hu
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hello,
Apparently it seems that the ObjectFile plugins got left out during importing
llvm, and because of this, it's not possible to save the core of the process
currently being debugged:
On aarch64, r322723:
root@build-pine64:/usr/ports/editors/emacs-devel/work/emacs-f44184f# cd lisp
l' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)' -f
batch-byte-compile emacs-lisp/macroexp.el
(lldb) target create "../src/bootstrap-emacs"
Current executable set to '../src/bootstrap-emacs' (aarch64).
(lldb) settings set -- target.run-args "-batch" "--no-site-file"
"--no-site-lisp" "--eval" "(setq load-prefer-newer t)" "-f"
"batch-byte-compile" "emacs-lisp/macroexp.el"
(lldb) r
Process 1016 launching
Process 1016 launched: '../src/bootstrap-emacs' (aarch64)
Process 1016 stopped
* thread #1, name = 'bootstrap-emacs', stop reason = signal SIGSEGV: invalid
address (fault address: 0x41b17978)
frame #0: 0x0000000000228460
bootstrap-emacs`xnrealloc(pa=0x0000000000000000, nitems=0,
item_size=1102150015) at alloc.c:939
936 {
937 eassert (0 <= nitems && 0 < item_size);
938 ptrdiff_t nbytes;
-> 939 if (INT_MULTIPLY_WRAPV (nitems, item_size, &nbytes) || SIZE_MAX <
nbytes)
940 memory_full (SIZE_MAX);
941 return xrealloc (pa, nbytes);
942 }
(lldb) process save-core /root/foo.core
error: Failed to save core file for process: no ObjectFile plugins were able to
save a core for this process
(lldb)
On amd64 11-STABLE r311927:
$ lldb
(lldb) process attach --pid 54625
Process 54625 stopped
Executable module set to "/usr/bin/systat".
Architecture set to: x86_64--freebsd11.0.
(lldb) process save-core foobar.core
error: Failed to save core file for process: no ObjectFile plugins were able to
save a core for this process
Sharing cores of currently being debugged processes can be very helpful, when
repoting issues with various software. For an example, currently I'm trying to
figure out while emacs-devel segfaults during build on aarch64, and the
autogenerated core is different, due to the process' internal sigsegv handler.
The FreeBSD-side of the report:
<a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222248">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222248</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>