1 | /* |
---|
2 | * Copyright (c) 2012, Chris Johns <chrisj@rtems.org> |
---|
3 | * |
---|
4 | * Permission to use, copy, modify, and/or distribute this software for any |
---|
5 | * purpose with or without fee is hereby granted, provided that the above |
---|
6 | * copyright notice and this permission notice appear in all copies. |
---|
7 | * |
---|
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
15 | */ |
---|
16 | /** |
---|
17 | * @file |
---|
18 | * |
---|
19 | * @ingroup RLD |
---|
20 | * |
---|
21 | * @brief A memory dump routine. |
---|
22 | * |
---|
23 | */ |
---|
24 | |
---|
25 | #if !defined (_RTEMS_UTILS_H_) |
---|
26 | #define _RTEMS_UTILS_H_ |
---|
27 | |
---|
28 | #include <stdint.h> |
---|
29 | |
---|
30 | namespace rtems |
---|
31 | { |
---|
32 | namespace utils |
---|
33 | { |
---|
34 | /** |
---|
35 | * Hex display memory. |
---|
36 | * |
---|
37 | * @param addr The address of the memory to display. |
---|
38 | * @param length The number of elements to display. |
---|
39 | * @param size The size of the data element. |
---|
40 | * @param real Use the real address based on addr. |
---|
41 | * @param line_length Number of elements per line. |
---|
42 | * @param offset The printed offset. |
---|
43 | */ |
---|
44 | void dump (const void* addr, |
---|
45 | size_t length, |
---|
46 | size_t size, |
---|
47 | bool real = false, |
---|
48 | size_t line_length = 16, |
---|
49 | uint32_t offset = 0); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | #endif |
---|