On 2024/02/06 6:18, [email protected] wrote:
>> On 2024/01/30 9:24, nilayvaish(a)google.com wrote:
>>
>> thanks for the information.
>>
>> I can see that there is the orc_header symbol and data also in a vmcore,
>> so maybe it can be read easily:
>>
>> crash> whatis orc_header
>> const u8 orc_header[20];
>> crash> rd -8 orc_header 20
>> ffffffffb718ef94: fe 5d 32 bf 58 1b d6 3b 2c a9 a5 c6 5b a5 a6 25 ...
>> ffffffffb718efa4: ea b3 fe 24
>>
>> but it's a hash, not a version number, how are you going to use this?
>>
>> Does crash have to have all historical hash values? all of format
>> changes do not affect crash's unwinder though.
>>
>> Thanks,
>> Kazu
>
> Hi Kazu
>
> I am thinking of comparing the hashes to figure the ORC format in use. This
> would be similar to how the drgn tool does things:
> https://github.com/osandov/drgn/commit/0d6438d994a4c46c4a08b73a98c637f5bc040ce8.
>
> Similar to how you printed the orc_header using the crash command line, if
> you can point out how to do so in a programmatic fashion, that would be great.
for example, you can get it like this in x86_64_ORC_init.
unsigned char buf[20];
if (try_get_symbol_data("orc_header", sizeof(buf), buf)) {
...
It's good to be able to notice the change of the ORC format easily, but
not all of changes affect crash, so for unknown values I think it should
be a warning at most.
Thanks,
Kazu
--
Crash-utility mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki