<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/libbacktrace/UnwindStack.h, branch master</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>Use new unwinder for offline in libbacktrace.</title>
<updated>2018-01-29T18:41:11+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-12-12T01:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=c8bec5aa91b20b0173bf6bf5f73f9e6daa40519d'/>
<id>c8bec5aa91b20b0173bf6bf5f73f9e6daa40519d</id>
<content type='text'>
libbbacktrace changes:
- Completely rewrite the BacktraceOffline class to use the new unwinder.
- Modify the test data to save ucontext_t data instead of unw_context data.
- Convert the previous tests from unw_context data to ucontext_t data.

Bug: 65682279

Test: New unit tests pass in libunwindstack.
Test: All offline tests continue to pass.
Change-Id: I540345c304b20199d46deeb0349a0638a0f3ab2f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libbbacktrace changes:
- Completely rewrite the BacktraceOffline class to use the new unwinder.
- Modify the test data to save ucontext_t data instead of unw_context data.
- Convert the previous tests from unw_context data to ucontext_t data.

Bug: 65682279

Test: New unit tests pass in libunwindstack.
Test: All offline tests continue to pass.
Change-Id: I540345c304b20199d46deeb0349a0638a0f3ab2f
</pre>
</div>
</content>
</entry>
<entry>
<title>Change all uintptr_t to uint64_t in API.</title>
<updated>2018-01-19T01:26:20+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2018-01-18T19:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=7937a36c8e24ef2dc5105a2a6b67f395934b2e2f'/>
<id>7937a36c8e24ef2dc5105a2a6b67f395934b2e2f</id>
<content type='text'>
In order to support the offline unwinding properly, get rid of the
usage of non-fixed type uintptr_t from all API calls.

In addition, completely remove the old local and remote unwinding code
that used libunwind.

The next step will be to move the offline unwinding to the new unwinder.

Bug: 65682279

Test: Ran unit tests for libbacktrace/debuggerd.
Test: Ran debuggerd -b on a few arm and arm64 processes.
Test: Ran crasher and crasher64 and verified tombstones look correct.
Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to support the offline unwinding properly, get rid of the
usage of non-fixed type uintptr_t from all API calls.

In addition, completely remove the old local and remote unwinding code
that used libunwind.

The next step will be to move the offline unwinding to the new unwinder.

Bug: 65682279

Test: Ran unit tests for libbacktrace/debuggerd.
Test: Ran debuggerd -b on a few arm and arm64 processes.
Test: Ran crasher and crasher64 and verified tombstones look correct.
Change-Id: Ib0c6cee3ad6785a102b74908a3d8e5e93e5c6b33
</pre>
</div>
</content>
</entry>
<entry>
<title>Add method to detect remote read function to use.</title>
<updated>2017-12-08T03:00:00+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-12-08T01:41:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=e328673a305a5c9f4acf73a7a2826eb61390632c'/>
<id>e328673a305a5c9f4acf73a7a2826eb61390632c</id>
<content type='text'>
The process_vm_read function is much faster than ptrace, but sometimes
that will not work on a remote process. Modify the libunwindstack
MemoryRemote object to figure out which one it can use.

Wrote new unit test to verify this checking behavior.

Modify libbacktrace so that the read from libunwind is used instead of
using the default ptrace calls.

Add some benchmarks to libbacktrace to compare the two different methods.

Test: Ran unit tests libbacktrace/libunwindstack/debuggerd.
Test: Ran debuggerd -b &lt;SYSTEM_SERVER_PID&gt;
Test: Ran debuggerd -b &lt;MEDIACODEC PID&gt;
Test: Ran debuggerd -b &lt;RANDOM_PID&gt;
Test: Used crasher to create tombstones and verified stack data is
Test: dumped properly.
Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The process_vm_read function is much faster than ptrace, but sometimes
that will not work on a remote process. Modify the libunwindstack
MemoryRemote object to figure out which one it can use.

Wrote new unit test to verify this checking behavior.

Modify libbacktrace so that the read from libunwind is used instead of
using the default ptrace calls.

Add some benchmarks to libbacktrace to compare the two different methods.

Test: Ran unit tests libbacktrace/libunwindstack/debuggerd.
Test: Ran debuggerd -b &lt;SYSTEM_SERVER_PID&gt;
Test: Ran debuggerd -b &lt;MEDIACODEC PID&gt;
Test: Ran debuggerd -b &lt;RANDOM_PID&gt;
Test: Used crasher to create tombstones and verified stack data is
Test: dumped properly.
Change-Id: If75ca238289532dd8e1de430d569cabb2523380a
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a method to share the process memory object.</title>
<updated>2017-09-05T21:30:22+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-09-01T18:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=5f118519fd323a0c71b54de9279e8a9ea6a56271'/>
<id>5f118519fd323a0c71b54de9279e8a9ea6a56271</id>
<content type='text'>
New function to create the process memory object. This allows for
a future where different remote process memory objects could be created
depending on the way remote memory can be created. Even different local
memory objects that access memory without doing any checks.

It also allows MemoryRange objects to share one single process memory object
and could help if the process memory object caches data.

Small changes to MapInfo::CreateMemory to when some errors are detected.
- Always check if the map is a device map, instead of only if the name
  is not empty.
- Check if a memory map is readable before creating the memory from process
  memory.

Bug: 23762183

Test: Ran unit tests, unwound on device using the new code.
Change-Id: I12a93c2dc19639689a528ec41c67bfac74d431b3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New function to create the process memory object. This allows for
a future where different remote process memory objects could be created
depending on the way remote memory can be created. Even different local
memory objects that access memory without doing any checks.

It also allows MemoryRange objects to share one single process memory object
and could help if the process memory object caches data.

Small changes to MapInfo::CreateMemory to when some errors are detected.
- Always check if the map is a device map, instead of only if the name
  is not empty.
- Check if a memory map is readable before creating the memory from process
  memory.

Bug: 23762183

Test: Ran unit tests, unwound on device using the new code.
Change-Id: I12a93c2dc19639689a528ec41c67bfac74d431b3
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the new unwind method.</title>
<updated>2017-08-03T17:15:44+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-07-27T16:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=6f3981c181677830c33093411b51ad6b0bf2e337'/>
<id>6f3981c181677830c33093411b51ad6b0bf2e337</id>
<content type='text'>
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Also needed to add this library to the a million and one places that the vndk
has hard-coded this data.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.
Change-Id: Ib270665dcb7a7607075e36d88be76dbde6e2faa8
(cherry picked from commit dc4104b720c7fd2014ccfa9fa621d02df58a43c4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Also needed to add this library to the a million and one places that the vndk
has hard-coded this data.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.
Change-Id: Ib270665dcb7a7607075e36d88be76dbde6e2faa8
(cherry picked from commit dc4104b720c7fd2014ccfa9fa621d02df58a43c4)
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Add support for the new unwind method."</title>
<updated>2017-08-02T01:47:31+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-08-02T01:47:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=bd625efbca611f56f9e206e8f876e128a1dd5364'/>
<id>bd625efbca611f56f9e206e8f876e128a1dd5364</id>
<content type='text'>
This reverts commit 5b460d13a4c383fa6c9a416d64502430ab065209.

Reason for revert: Strange sailfish boot problem.

Change-Id: Ibde9375405cca4343c262335647dac120aab4d73
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5b460d13a4c383fa6c9a416d64502430ab065209.

Reason for revert: Strange sailfish boot problem.

Change-Id: Ibde9375405cca4343c262335647dac120aab4d73
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the new unwind method.</title>
<updated>2017-07-31T20:00:35+00:00</updated>
<author>
<name>Christopher Ferris</name>
<email>cferris@google.com</email>
</author>
<published>2017-07-27T16:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=5b460d13a4c383fa6c9a416d64502430ab065209'/>
<id>5b460d13a4c383fa6c9a416d64502430ab065209</id>
<content type='text'>
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.

Change-Id: I252b9c2497e2d3d94347dd6e506170bf50cbfe16
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add a comment to the GetElf function to indicate that it never returns
nullptr.

Bug: 23762183

Test: Built, nothing uses the new code.
Test: However, I did run backtrace_test using this code, and all tests pass.

Change-Id: I252b9c2497e2d3d94347dd6e506170bf50cbfe16
</pre>
</div>
</content>
</entry>
</feed>
