[native crash] dump memory around instruction pointer (#8911)
commita7f8569be7080bf6f6699c9dbfe13fa1d69fcfe1
authorBernhard Urban <bernhard.urban@xamarin.com>
Wed, 30 May 2018 13:25:08 +0000 (30 15:25 +0200)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 30 May 2018 13:25:08 +0000 (30 09:25 -0400)
tree705b6adc572d3e5f042b99fbc26c59eca85469e3
parent3a8218e5d552b9908360a3ee92e7a3dfb8a88e75
[native crash] dump memory around instruction pointer (#8911)

[native crash] dump memory around instruction pointer

It can help to identify issues in generated code. We don't want to ship a disassembler, so we just do a hexdump. It looks like this:

```
Memory around native instruction pointer (0x10ca1b50e):
0x10ca1b4fe  48 c7 04 24 00 00 00 00 48 8b 44 24 10 48 8b f8  H..$....H.D$.H..
0x10ca1b50e  83 38 00 48 8d 64 24 00 49 bb 3a b5 a1 0c 01 00  .8.H.d$.I.:.....
0x10ca1b51e  00 00 41 ff d3 48 89 04 24 e9 00 00 00 00 48 8b  ..A..H..$.....H.
0x10ca1b52e  04 24 e9 00 00 00 00 48 83 c4 18 c3 e8 c1 1c 53  .$.....H.......S
```

Offline tools can be used to disassemble the code.
mono/mini/mini-exceptions.c