@@ -352,6 +352,14 @@ strings, rather than as numbers, in order to avoid representational issues.
352352Additionally, boolean fields that are ``false ``, as well as fields whose
353353values are unknown or empty, will normally be completely omitted to save space.
354354
355+ Where hexadecimal *values * are output, they will normally be prefixed with
356+ a ``0x `` prefix. Hexadecimal *data *, by contrast, such as captured memory or
357+ build IDs, will not have a prefix and will be formatted as a string with no
358+ whitespace.
359+
360+ Note that since JSON does not officially support hexadecimal, hexadecimal
361+ values will always be output as strings.
362+
355363JSON crash logs will always contain the following top level fields:
356364
357365+-------------------+--------------------------------------------------------+
@@ -374,34 +382,33 @@ JSON crash logs will always contain the following top level fields:
374382+-------------------+--------------------------------------------------------+
375383| architecture | The name of the processor architecture for this crash. |
376384+-------------------+--------------------------------------------------------+
385+ | threads | An array of thread records, one for each thread. |
386+ +-------------------+--------------------------------------------------------+
377387
378388These will be followed by some or all of the following, according to the
379389backtracer settings:
380390
381391+-------------------+--------------------------------------------------------+
382392| Field | Value |
383393+===================+========================================================+
384- | threads | An array of thread records, one for each thread (if the |
385- | | backtracer is set to give backtraces for all threads). |
386- +-------------------+--------------------------------------------------------+
387- | crashedThread | A single thread record for the crashing thread (if the |
388- | | backtracer is set to give a backtrace only for the |
389- | | crashed thread). |
390- +-------------------+--------------------------------------------------------+
391- | registers | A dictionary containing the register contents on the |
392- | | crashed thread (if set to give registers for only the |
393- | | crashed thread). |
394- | | |
395- | | The dictionary is keyed by architecture specific |
396- | | register name; values are given as hexadecimal |
397- | | strings. |
394+ | omittedThreads | A count of the number of threads that were omitted, if |
395+ | | the backtracer is set to give a backtrace only for the |
396+ | | crashed thread. Omitted if zero. |
398397+-------------------+--------------------------------------------------------+
399398| capturedMemory | A dictionary containing captured memory contents, if |
400399| | any. This will not be present if the ``sanitize `` |
401400| | setting is enabled, or if no data was captured. |
402401| | |
403402| | The dictionary is keyed by hexadecimal addresses, as |
404- | | strings; values are also hexadecimal strings. |
403+ | | strings (with a ``0x `` prefix); the captured data is |
404+ | | also given as a hexadecimal string, but with no prefix |
405+ | | and no inter-byte whitespace. |
406+ | | |
407+ | | You should make no assumptions about the number of |
408+ | | bytes captured at each address; the backtracer will |
409+ | | currently attempt to grab 16 bytes, but this may |
410+ | | change if only a shorter range is available or in |
411+ | | future according to configuration parameters. |
405412+-------------------+--------------------------------------------------------+
406413| omittedImages | If ``images `` is set to ``mentioned ``, this is an |
407414| | integer giving the number of images whose details were |
@@ -427,8 +434,16 @@ A thread record is a dictionary with the following fields:
427434| crashed | ``true `` if the thread is the one that crashed, |
428435| | omitted otherwise. |
429436+-------------------+--------------------------------------------------------+
430- | registers | If ``registers `` is set to ``all ``, the registers for |
431- | | the thread (see above for the format). |
437+ | registers | A dictionary containing the register contents on the |
438+ | | crashed thread. |
439+ | | |
440+ | | The dictionary is keyed by architecture specific |
441+ | | register name; values are given as hexadecimal |
442+ | | strings (with a ``0x `` prefix). |
443+ | | |
444+ | | This field may be omitted for threads other than the |
445+ | | crashed thread, if the ``registers `` setting is set |
446+ | | to ``crashed ``. |
432447+-------------------+--------------------------------------------------------+
433448| frames | An array of frames forming the backtrace for the |
434449| | thread. |
@@ -514,7 +529,8 @@ An image record is a dictionary with the following fields:
514529| name | The name of the image (omitted if not known). |
515530+-------------------+--------------------------------------------------------+
516531| buildId | The build ID (aka unique ID) of the image (omitted if |
517- | | not known). |
532+ | | not known). Build IDs are formatted as un-prefixed |
533+ | | hexadecimal strings, with no inter-byte whitespace. |
518534+-------------------+--------------------------------------------------------+
519535| path | The path to the image (omitted if not known). |
520536+-------------------+--------------------------------------------------------+
0 commit comments