<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lldb/source/Plugins/Process/POSIX/CrashReason.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[lldb] Implement CrashReason using UnixSignals</title>
<updated>2023-03-20T11:39:32+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-14T11:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0107513fe79da7670e37c29c0862794a2213a89c'/>
<id>0107513fe79da7670e37c29c0862794a2213a89c</id>
<content type='text'>
By adding signal codes to UnixSignals and adding a new function
where you can get a string with optional address and bounds.

Added signal codes to the Linux, FreeBSD and NetBSD signal sets.
I've checked the numbers against the relevant sources.

Each signal code has a code number, description and printing options.
By default you just get the descripton, you can opt into adding either
a fault address or bounds information.

Bounds signals we'll use the description, unless we have the bounds
values in which case we say whether it is an upper or lower bound
issue.

GetCrashReasonString remains in CrashReason because we need it to
be compiled only for platforms with siginfo_t. Ideally it would
move into NativeProcessProtocol, but that is also used
by NativeRegisterContextWindows, where there would be no siginfo_t.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D146044
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By adding signal codes to UnixSignals and adding a new function
where you can get a string with optional address and bounds.

Added signal codes to the Linux, FreeBSD and NetBSD signal sets.
I've checked the numbers against the relevant sources.

Each signal code has a code number, description and printing options.
By default you just get the descripton, you can opt into adding either
a fault address or bounds information.

Bounds signals we'll use the description, unless we have the bounds
values in which case we say whether it is an upper or lower bound
issue.

GetCrashReasonString remains in CrashReason because we need it to
be compiled only for platforms with siginfo_t. Ideally it would
move into NativeProcessProtocol, but that is also used
by NativeRegisterContextWindows, where there would be no siginfo_t.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D146044
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove #if guards from AppendBounds to fix compile on old POSIX.</title>
<updated>2023-03-16T23:16:21+00:00</updated>
<author>
<name>Daniel Thornburgh</name>
<email>dthorn@google.com</email>
</author>
<published>2023-03-16T23:15:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=88eb4cbbfe7ded9556131c3bd4228ee9e9d01b4d'/>
<id>88eb4cbbfe7ded9556131c3bd4228ee9e9d01b4d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[lldb] Refactor CrashReason"</title>
<updated>2023-03-15T10:15:44+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-15T09:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6db766aa1a079085a3952f62c769cad16a1cbf3e'/>
<id>6db766aa1a079085a3952f62c769cad16a1cbf3e</id>
<content type='text'>
This reverts commit 71c4d186f1cf247f1aa45f4fd1b38f350b68d123.
The reinterpret casts were not needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 71c4d186f1cf247f1aa45f4fd1b38f350b68d123.
The reinterpret casts were not needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[lldb] Refactor CrashReason"</title>
<updated>2023-03-15T09:54:47+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-15T09:54:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71c4d186f1cf247f1aa45f4fd1b38f350b68d123'/>
<id>71c4d186f1cf247f1aa45f4fd1b38f350b68d123</id>
<content type='text'>
This reverts commit af38530ee29c285f3827e33a41edf27c9c3a6767 due
to a build failure on 32 bit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit af38530ee29c285f3827e33a41edf27c9c3a6767 due
to a build failure on 32 bit.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Refactor CrashReason</title>
<updated>2023-03-15T09:44:02+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-09T14:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af38530ee29c285f3827e33a41edf27c9c3a6767'/>
<id>af38530ee29c285f3827e33a41edf27c9c3a6767</id>
<content type='text'>
So that there is only one function that NativeThreads call,
which takes a siginfo. Everything else is an internal detail.

Reviewed By: labath, JDevlieghere

Differential Revision: https://reviews.llvm.org/D146043
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So that there is only one function that NativeThreads call,
which takes a siginfo. Everything else is an internal detail.

Reviewed By: labath, JDevlieghere

Differential Revision: https://reviews.llvm.org/D146043
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Use static instead of anonymous namesapce in CrashReason</title>
<updated>2023-03-13T11:57:04+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-09T14:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2dc1d48a454fd511e42468e427fde49780f352fc'/>
<id>2dc1d48a454fd511e42468e427fde49780f352fc</id>
<content type='text'>
As preferred by the llvm guidelines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As preferred by the llvm guidelines.
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Remove unused CrashReasonAsString function</title>
<updated>2023-03-08T14:27:59+00:00</updated>
<author>
<name>David Spickett</name>
<email>david.spickett@linaro.org</email>
</author>
<published>2023-03-08T10:03:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b7217a8fc94d33f44ec8a2e695e75f70a6eeea1e'/>
<id>b7217a8fc94d33f44ec8a2e695e75f70a6eeea1e</id>
<content type='text'>
The last user was ProcessMessage, which has itself been removed.

Reviewed By: emaste

Differential Revision: https://reviews.llvm.org/D145561
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last user was ProcessMessage, which has itself been removed.

Reviewed By: emaste

Differential Revision: https://reviews.llvm.org/D145561
</pre>
</div>
</content>
</entry>
<entry>
<title>CrashReason: Add MTE tag check faults to the list of crash reasons.</title>
<updated>2020-12-29T22:36:50+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>peter@pcc.me.uk</email>
</author>
<published>2020-12-17T23:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7e5a187de31358741f9868cdee7b0c63c1343d8d'/>
<id>7e5a187de31358741f9868cdee7b0c63c1343d8d</id>
<content type='text'>
As of Linux 5.10, the kernel may report either of the two following
crash reasons:
- SEGV_MTEAERR: async MTE tag check fault
- SEGV_MTESERR: sync MTE tag check fault

Teach LLDB about them.

Differential Revision: https://reviews.llvm.org/D93495
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of Linux 5.10, the kernel may report either of the two following
crash reasons:
- SEGV_MTEAERR: async MTE tag check fault
- SEGV_MTESERR: sync MTE tag check fault

Teach LLDB about them.

Differential Revision: https://reviews.llvm.org/D93495
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb][NFC] Fix all formatting errors in .cpp file headers</title>
<updated>2020-01-24T07:52:55+00:00</updated>
<author>
<name>Raphael Isemann</name>
<email>teemperor@gmail.com</email>
</author>
<published>2020-01-24T07:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=808142876c10b52e7ee57cdc6dcf0acc5c97c1b7'/>
<id>808142876c10b52e7ee57cdc6dcf0acc5c97c1b7</id>
<content type='text'>
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).

This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).

Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73258
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).

This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).

Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73258
</pre>
</div>
</content>
</entry>
<entry>
<title>[lldb] Fix ARM32 inferior calls</title>
<updated>2019-12-21T10:12:17+00:00</updated>
<author>
<name>Jan Kratochvil</name>
<email>jan.kratochvil@redhat.com</email>
</author>
<published>2019-12-21T10:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df6879ec0227a8a5e5697e505201d0f4444f03a4'/>
<id>df6879ec0227a8a5e5697e505201d0f4444f03a4</id>
<content type='text'>
  echo -e '#include &lt;unistd.h&gt;\nint main(void){\nsync();return 0;}'|./bin/clang -g -x c -;./bin/lldb -o 'file ./a.out' -o 'b main' -o r -o 'p (void)sync()'

Actual:

  error: Expression can't be run, because there is no JIT compiled function

Expected:

  &lt;nothing, sync() has been executed&gt;

This patch has been checked by:
  D71707: clang-tidy: new bugprone-pointer-cast-widening
  https://reviews.llvm.org/D71707

Casting from 32-bit `void *` to `uint64_t` requires an intermediate `uintptr_t` cast otherwise the pointer gets sign-extended:

  echo -e '#include &lt;stdio.h&gt;\n#include &lt;stdint.h&gt;\nint main(void){void *p=(void *)0x80000000;unsigned long long ull=(unsigned long long)p;unsigned long long ull2=(unsigned long
long)(uintptr_t)p;printf("p=%p ull=0x%llx ull2=0x%llx\\n",p,ull,ull2);return 0;}'|gcc -Wall -m32 -x c -;./a.out
  &lt;stdin&gt;: In function ‘main’:
  &lt;stdin&gt;:3:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  p=0x80000000 ull=0xffffffff80000000 ull2=0x80000000

With debug output:
Actual:

  IRMemoryMap::WriteMemory (0xb6ff8640, 0xffffffffb6f82158, 0x112) went to [0xb6ff8640..0xb6ff86b3)
  Code can be run in the target.
  Found function, has local address 0xffffffffb6f84000 and remote address 0xffffffffffffffff
  Couldn't disassemble function : Couldn't find code range for function _Z12$__lldb_exprPv
  Sections:
  [0xb6f84000+0x3c]-&gt;0xb6ff9020 (alignment 4, section ID 0, name .text)
  ...
  HandleCommand, command did not succeed
  error: Expression can't be run, because there is no JIT compiled function

Expected:

  IRMemoryMap::WriteMemory (0xb6ff8640, 0xb6faa15c, 0x128) went to [0xb6ff8640..0xb6ff86c3)
  IRExecutionUnit::GetRemoteAddressForLocal() found 0xb6fac000 in [0xb6fac000..0xb6fac040], and returned 0xb6ff9020 from [0xb6ff9020..0xb6ff9060].
  Code can be run in the target.
  Found function, has local address 0xb6fac000 and remote address 0xb6ff9020
  Function's code range is [0xb6ff9020+0x40]
  ...
  Function data has contents:
  0xb6ff9020: 10 4c 2d e9 08 b0 8d e2 08 d0 4d e2 00 40 a0 e1
  ...
  Function disassembly:
  0xb6ff9020: 0xe92d4c10   push   {r4, r10, r11, lr}

Differential revision: https://reviews.llvm.org/D71498
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  echo -e '#include &lt;unistd.h&gt;\nint main(void){\nsync();return 0;}'|./bin/clang -g -x c -;./bin/lldb -o 'file ./a.out' -o 'b main' -o r -o 'p (void)sync()'

Actual:

  error: Expression can't be run, because there is no JIT compiled function

Expected:

  &lt;nothing, sync() has been executed&gt;

This patch has been checked by:
  D71707: clang-tidy: new bugprone-pointer-cast-widening
  https://reviews.llvm.org/D71707

Casting from 32-bit `void *` to `uint64_t` requires an intermediate `uintptr_t` cast otherwise the pointer gets sign-extended:

  echo -e '#include &lt;stdio.h&gt;\n#include &lt;stdint.h&gt;\nint main(void){void *p=(void *)0x80000000;unsigned long long ull=(unsigned long long)p;unsigned long long ull2=(unsigned long
long)(uintptr_t)p;printf("p=%p ull=0x%llx ull2=0x%llx\\n",p,ull,ull2);return 0;}'|gcc -Wall -m32 -x c -;./a.out
  &lt;stdin&gt;: In function ‘main’:
  &lt;stdin&gt;:3:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  p=0x80000000 ull=0xffffffff80000000 ull2=0x80000000

With debug output:
Actual:

  IRMemoryMap::WriteMemory (0xb6ff8640, 0xffffffffb6f82158, 0x112) went to [0xb6ff8640..0xb6ff86b3)
  Code can be run in the target.
  Found function, has local address 0xffffffffb6f84000 and remote address 0xffffffffffffffff
  Couldn't disassemble function : Couldn't find code range for function _Z12$__lldb_exprPv
  Sections:
  [0xb6f84000+0x3c]-&gt;0xb6ff9020 (alignment 4, section ID 0, name .text)
  ...
  HandleCommand, command did not succeed
  error: Expression can't be run, because there is no JIT compiled function

Expected:

  IRMemoryMap::WriteMemory (0xb6ff8640, 0xb6faa15c, 0x128) went to [0xb6ff8640..0xb6ff86c3)
  IRExecutionUnit::GetRemoteAddressForLocal() found 0xb6fac000 in [0xb6fac000..0xb6fac040], and returned 0xb6ff9020 from [0xb6ff9020..0xb6ff9060].
  Code can be run in the target.
  Found function, has local address 0xb6fac000 and remote address 0xb6ff9020
  Function's code range is [0xb6ff9020+0x40]
  ...
  Function data has contents:
  0xb6ff9020: 10 4c 2d e9 08 b0 8d e2 08 d0 4d e2 00 40 a0 e1
  ...
  Function disassembly:
  0xb6ff9020: 0xe92d4c10   push   {r4, r10, r11, lr}

Differential revision: https://reviews.llvm.org/D71498
</pre>
</div>
</content>
</entry>
</feed>
